checkout@v2 not getting recent commits
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
Assume a Github action with two Jobs - job1 & job2
In job1:
Use checkout action to checkout the repo, update any file in the repo, commit and push the changes.
In job2:
Again use checkout action. The repo doesn't contain the commit made in job1.
Here is a replicable sample:
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
// update file1.txt
git add file1.txt
git config --local user.email "github-actions@users.noreply.github.com"
git config --local user.name "github-actions"
git commit -m "updated file1"
git push
deploy:
needs: update-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cat publish file
run: |
# the changes made in job1 are not reflected here
cat file1.txt
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the two-job workflow in the issue body, reproducing the update-version and deploy steps with actions/checkout@v2 and file1.txt. Check the checkout action entry point and its documented behavior around revisions; done means confirming the cause and defining the required code or documentation change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github-actions, typescript
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100