File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,24 +59,13 @@ jobs:
5959
6060 # Extract metadata (tags, labels) for Docker
6161 # https://github.com/docker/metadata-action
62- - name : Extract Docker metadata for PR
62+ - name : Extract Docker metadata
6363 id : meta
64- if : github.event_name == 'pull_request'
6564 uses : docker/metadata-action@v5
6665 with :
6766 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
68- tags :
69- " pr-${{ github.event.pull_request.number }}"
70-
71- - name : Extract Docker metadata for push
72- id : meta
73- if : github.event_name == 'push'
74- uses : docker/metadata-action@v5
75- with :
76- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
77- tags :
78- " latest"
79- " ${{ github.sha }}"
67+ tags : |
68+ ${{ github.event_name == 'pull_request' && 'type=ref,event=pr' || 'type=sha' }}
8069
8170 # Build and push Docker image with Buildx
8271 # https://github.com/docker/build-push-action
You can’t perform that action at this time.
0 commit comments