Ensure we check out current commit
Before we were checking out the 'github.ref', which described the
"fully-formed ref of the branch or tag that triggered the workflow"
instead of the actual commit we want.[1] If there are commits above the
commit that triggered the current run (e.g. we pushed multiple to main
or similar), we would compare the wrong (head) commit.
Removing the 'ref:' option should check out the correct SHA instead.[2]
If it turns out it does not, we could still manually supply
'${{ github.sha }}'.
[1]: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
[2]: https://github.com/actions/checkout
This commit is contained in:
parent
c178fb1f44
commit
ccdecda26c
1 changed files with 0 additions and 1 deletions
1
.github/workflows/build.yaml
vendored
1
.github/workflows/build.yaml
vendored
|
|
@ -23,7 +23,6 @@ jobs:
|
|||
- name: checkout local templates
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- id: grabchanged
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue