Skip to content

Commit

Permalink
use latest tag for release
Browse files Browse the repository at this point in the history
  • Loading branch information
sp-yduck committed Dec 6, 2023
1 parent 2703376 commit 9d57ea4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -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

0 comments on commit 9d57ea4

Please sign in to comment.