@@ -6,9 +6,8 @@ name: Upload Docker Image
66# documentation.
77
88on :
9- push :
10- # Publish semver tags as releases.
11- tags : [ 'v*.*.*' ]
9+ release :
10+ types : [published]
1211
1312env :
1413 # Use docker.io for Docker Hub if empty
@@ -39,13 +38,12 @@ jobs:
3938 # multi-platform images and export cache
4039 # https://github.com/docker/setup-buildx-action
4140 - name : Set up Docker Buildx
42- uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
41+ uses : docker/setup-buildx-action@v3
4342
4443 # Login against a Docker registry except on PR
4544 # https://github.com/docker/login-action
4645 - name : Log into registry ${{ env.REGISTRY }}
47- if : github.event_name != 'pull_request'
48- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
46+ uses : docker/login-action@v3
4947 with :
5048 registry : ${{ env.REGISTRY }}
5149 username : ${{ secrets.DOCKER_USERNAME }}
@@ -55,18 +53,18 @@ jobs:
5553 # https://github.com/docker/metadata-action
5654 - name : Extract Docker metadata
5755 id : meta
58- uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
56+ uses : docker/metadata-action@v5
5957 with :
6058 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6159
6260 # Build and push Docker image with Buildx (don't push on PR)
6361 # https://github.com/docker/build-push-action
6462 - name : Build and push Docker image
6563 id : build-and-push
66- uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
64+ uses : docker/build-push-action@v6
6765 with :
6866 context : .
69- push : ${{ github.event_name != 'pull_request' }}
67+ push : true
7068 tags : ${{ steps.meta.outputs.tags }}
7169 labels : ${{ steps.meta.outputs.labels }}
7270 cache-from : type=gha
0 commit comments