'No such file or directory' Error when running scheduled github action #27093
-
Dear github actions support community, I have a cron-job that runs once per week and executes an R script by taking as input a number of variables. If I push to the Github repository or click on the ‘Run’ button of the Github action then it runs successfully. However, it gives the error message ‘No such file or directory’ when it runs on the scheduled time, i.e. once per week. You can see the previous workflows in the following weblink: https://github.com/mlampros/fitbitVizBlog/actions I tried various thinks to make it work, however none has worked. In the same .yml file there are multiple calls to the ‘Rscript’ command and although the majority work the specific ‘Rscript’ that takes the environment variables doesn’t. I attach in this message also the error that I receive in form of a screenshot, The ‘R_templates’ folder that includes the ‘data_template.R’ file is in the working directory of the github action step because I’ve specified:
and I also checked this by using,
Hopefully it’s something obvious and simple that I’m not aware of. I also took a look to previous similar issues with the same error message (‘No such file or directory’ ) where the issues were related to the upper and lower case sensitivity, however I’ve used the exact names of folders and files in my .yml file. Thank you in advance and for your time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This part of the workflow is your problem:
The |
Beta Was this translation helpful? Give feedback.
-
@airtower-luna thank you very match, your answer was the solution to the mentioned issue. |
Beta Was this translation helpful? Give feedback.
This part of the workflow is your problem:
The
if
conditions on the twoactions/checkout
effectively mean that checkout will only happen for push or pull_request events, not on the scheduled run. So your repository data isn’t available. One simple fix would be to change the second condition togithub.event_name != 'pull_request'
.