-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Labels
Description
Description
When using {{branch}} variable in a pull_request event the output is '' (as documented).
It would be super useful to have it populated with github.event.pull_request.head.ref to compose tags like the following:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
tags: |
type=sha,format=short,prefix={{branch}}-At the moment I'm doing something like:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
tags: |
type=sha,format=short,prefix=${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '{{branch}}' }}-But it seems a hack to me, is there any drawback in doing that?
lbjarre, FrankStrieter, agross, adelvalvisma, jleeothon and 4 more