Conversation
Instead of merging the PR HEAD to the default branch and using that ephemeral commit.
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: fs Click to expand |
|
Scan Type: image Click to expand |
|
Scan Type: image Click to expand |
|
Scan Type: image Click to expand |
|
Scan Type: image Click to expand |
| # head commit sha. See - | ||
| # https://github.com/actions/checkout?tab=readme-ov-file#checkout-pull-request-head-commit-instead-of-merge-commit | ||
| # And as a backup when not in a PR context we use the github.sha. | ||
| type=sha,event=pr |
There was a problem hiding this comment.
type=sha doesn't have the event attribute, and the type=ref is responsible for the pr-76 style tags on a pr event.
If you want to disable sha-xyz tags on PRs, you have to use something like
type=sha,enable=${{ github.event_name != 'pull_request' }}
If you want to construct the HEAD sha tag manually you can use type=raw (see here) and something like type=raw,value=sha-${{ github. ...}},enable=${{gitub. ...}}
If you want to change the PR behaviour (the way you linked) you don't have to change anything in the metadata action, but rather modify the checkout action step.
There was a problem hiding this comment.
Thanks, I don't know what I was thinking when I pushed this 🤔 ? I've updated to just change the checked out commit.
Instead of merging the PR HEAD to the default branch and using that ephemeral commit.