Skip to content

Commit 583de43

Browse files
authored
Merge pull request #159 from k8s-proxmox/feature/gha
use latest tag for release
2 parents 2703376 + 9d57ea4 commit 583de43

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/docker-publish.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: publish container image
33
on:
44
push:
55
# Publish semver tags as releases.
6-
tags: [ 'v*.*.*' ]
6+
tags: ["v*.*.*"]
77

88
env:
99
REGISTRY: ghcr.io
1010
# github.repository as <account>/<repo>
1111
IMAGE_NAME: ${{ github.repository }}
1212

13-
1413
jobs:
1514
build:
1615
runs-on: ubuntu-latest
@@ -35,3 +34,9 @@ jobs:
3534
# platform = linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
3635
- name: Build and push Docker image
3736
run: "make docker-buildx PLATFORMS=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}"
37+
38+
- name: push with 'latest' tag
39+
run: |
40+
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
41+
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
42+
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

0 commit comments

Comments
 (0)