Skip to content

Commit

Permalink
Merge pull request #159 from k8s-proxmox/feature/gha
Browse files Browse the repository at this point in the history
use latest tag for release
  • Loading branch information
sp-yduck authored Dec 6, 2023
2 parents 2703376 + 9d57ea4 commit 583de43
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 583de43

Please sign in to comment.