From 9d57ea419e850147d8fdf47a7d1e40535a694134 Mon Sep 17 00:00:00 2001 From: sp-yduck Date: Wed, 6 Dec 2023 11:29:47 +0000 Subject: [PATCH] use latest tag for release --- .github/workflows/docker-publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f55ccfc..81fac9e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -3,14 +3,13 @@ name: publish container image on: push: # Publish semver tags as releases. - tags: [ 'v*.*.*' ] + tags: ["v*.*.*"] env: REGISTRY: ghcr.io # github.repository as / IMAGE_NAME: ${{ github.repository }} - jobs: build: runs-on: ubuntu-latest @@ -35,3 +34,9 @@ jobs: # platform = linux/amd64,linux/arm64,linux/s390x,linux/ppc64le - name: Build and push Docker image run: "make docker-buildx PLATFORMS=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}" + + - name: push with 'latest' tag + run: | + docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} + docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest