Open
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
Metadata
Metadata
Assignees
Labels
No labels