Skip to content

Commit 9cf094e

Browse files
chore: fix docker build and push github action (#27)
bumps all actions to their latest version ans parse the tag before pushing the image.
1 parent d3db149 commit 9cf094e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/release-prod.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20+
- name: Extract tag name
21+
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
22+
2023
- name: Set up Go
2124
uses: actions/setup-go@v4
2225
with:
@@ -49,18 +52,18 @@ jobs:
4952
*.tgz
5053
5154
- name: Set up Docker Buildx
52-
uses: docker/setup-buildx-action@v1
55+
uses: docker/setup-buildx-action@v2
5356

5457
- name: Login to GitHub Container Registry
55-
uses: docker/login-action@v1
58+
uses: docker/login-action@v2
5659
with:
5760
registry: ghcr.io
5861
username: ${{ github.actor }}
5962
password: ${{ secrets.GITHUB_TOKEN }}
6063

6164
- name: Build and Publish HelmVM Builder Server image.
62-
uses: docker/build-push-action@v2
65+
uses: docker/build-push-action@v4
6366
with:
6467
context: .
6568
push: true
66-
tags: ghcr.io/${{ github.repository }}:${{ github.ref }}
69+
tags: ghcr.io/${{ github.repository }}:$TAG_NAME

0 commit comments

Comments
 (0)