Comments (6)
Hi Peter. I had totally forgotten to reply but thank you for providing a work around! It works around the issue indeed. I've added a needs clause to prevent the second job from running until the first job is finished (https://github.com/LindaNab/me_neo/blob/master/.github/workflows/main.yml).
from create-pull-request.
Hi @LindaNab
It does seem to have only failed on the runs that ran over 1 hour, which is very strange if it's not a coincidence. Assuming that is the case, it's possible that something in the virtual machine is timing out after 1 hour. Are you able to try using runs-on: ubuntu-latest
instead of runs-on: macOS-latest
to see if that makes a difference?
from create-pull-request.
Hi @peter-evans
Thanks for your reply, I've changed runs-on: macOS-latest to runs-on: ubuntu-latest but unfortunately, this didn't make a difference (i.e., the same error occurred):
https://github.com/LindaNab/me_neo/actions/runs/62822395
from create-pull-request.
This is a very strange issue. I'll need to take some time to try and reproduce this and figure out what is going on. If something really is timing out after an hour on the Actions runner then it might be out of my control.
One possible way you could try to work around this is by separating the workflow into two jobs. The first job executes your workload and produces the output. The output is then uploaded as an artifact using the upload-artifact action. The second job checks out the repository again, downloads the artifact with download-artifact action, and then raises a pull request. Creating a "fresh job" like this might work around the issue.
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
scen_num: [0, 1, 2, 3, 4]
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- name: Run simulation study for scen_num ${{ matrix.scen_num }}
run: |-
Rscript rcode/testjob.R ${{ matrix.scen_num }} 5
- uses: actions/upload-artifact@v1
with:
name: data-output-${{ matrix.scen_num }}
path: data/output
pullRequest:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
scen_num: [0, 1, 2, 3, 4]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: data-output-${{ matrix.scen_num }}
path: data/output
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Add sim output simulation study datagen_scen scen_num ${{ matrix.scen_num }}
committer: Linda Nab <[email protected]>
branch: patch${{ matrix.scen_num }}
from create-pull-request.
Great! Glad that worked for you.
Sorry, I forgot about the needs
clause. Updated the example above in case anyone has the same problem and sees this issue.
As I mentioned before, it seems likely that something is timing out or expiring in jobs on the Actions runner after 1 hour. There wouldn't be anything I could do to fix that root problem, so for now I'm going to consider this "fixed" by the workaround.
from create-pull-request.
I found these notes in the official documentation that confirm it's the GITHUB_TOKEN
that expires after 60 minutes. I think this information was added fairly recently.
The installation access token expires after 60 minutes. GitHub fetches a token for each job, before the job begins.
Note: When a workflow run or its jobs are queued for more than one hour, the token may expire before the job starts.
from create-pull-request.
Related Issues (20)
- This works great
- When the workflow is triggered with `base` and `branch`, the PR is not created HOT 1
- Syntax error line 17 HOT 2
- remote missing HOT 2
- How to always have open PR from dev to prod HOT 1
- Autosync PR out of date HOT 2
- Automatically delete body-path HOT 1
- Not opening PR's HOT 2
- Support creation of one PR per file HOT 2
- Overcoming github's limitations on triggering CI HOT 1
- PR is not updated even there are changes after new incoming changes on master HOT 4
- Run bot
- DeeNuff
- Attempting creation of pull request Error: Not Found HOT 10
- Resource not accessible by integration HOT 6
- It is not possible to create two continuous pull requests HOT 2
- Cannot create a Pull Request when it flags conflicts HOT 9
- Unexpected v7 error `fatal: ambiguous argument` on `diff --stat` HOT 5
- [Feature Request]: Allow commit author to be optional HOT 1
- Commit is not recreated if author changes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-pull-request.