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:
Marty Oehme 2025-03-08 17:32:11 +01:00
parent c178fb1f44
commit ccdecda26c
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -23,7 +23,6 @@ jobs:
- name: checkout local templates
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- id: grabchanged