Closed iwata closed 3 months ago
I'm using type=ref,event=pr,suffix=-{{sha}} as tags option. But sha is incorrect.
type=ref,event=pr,suffix=-{{sha}}
tags
sha
sha returns github.event.pull_request.head.sha.
github.event.pull_request.head.sha
sha returns github.sha.
github.sha
No response
- name: Docker meta id: meta uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: app tags: | type=ref,event=pr,suffix=-{{sha}} - name: debug run: | echo ${{ steps.meta.outputs.tags }} git rev-parse --short ${{ github.event.pull_request.head.sha }} git rev-parse --short "$GITHUB_SHA"
pr-xxxx-937f26e f03bb03 937f26e
You need to set DOCKER_METADATA_PR_HEAD_SHA: true env var: https://github.com/docker/metadata-action?tab=readme-ov-file#environment-variables
DOCKER_METADATA_PR_HEAD_SHA: true
Contributing guidelines
I've found a bug, and:
Description
I'm using
type=ref,event=pr,suffix=-{{sha}}
astags
option. Butsha
is incorrect.Expected behaviour
sha
returnsgithub.event.pull_request.head.sha
.Actual behaviour
sha
returnsgithub.sha
.Repository URL
No response
Workflow run URL
No response
YAML workflow
Workflow logs
BuildKit logs
No response
Additional info
No response