Skip to content

Commit

Permalink
chore: Update the Github Action to set correct tag for the Docker Ima…
Browse files Browse the repository at this point in the history
…ge (#493)

Signed-off-by: Sudhanshu Pandey <sp6370@nyu.edu>
Signed-off-by: Joonas Bergius <joonas@cosmonic.com>
Co-authored-by: Joonas Bergius <joonas@users.noreply.github.com>
  • Loading branch information
sp6370 and joonas authored Nov 20, 2024
1 parent 0fb04cf commit 6c425a1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ jobs:
run: |
echo "OWNER=${GITHUB_REPOSITORY_OWNER,,}" >>$GITHUB_ENV
- name: Set the formatted release version for the docker tag
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
echo "RELEASE_VERSION_DOCKER_TAG=${RELEASE_VERSION#v}" >> $GITHUB_ENV
- name: Build and push (tag)
uses: docker/build-push-action@v6
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
Expand All @@ -225,7 +230,10 @@ jobs:
build-args: |
BIN_ARM64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-aarch64
BIN_AMD64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-amd64
tags: ghcr.io/${{ env.OWNER }}/wadm:latest,ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION }}
tags: |
ghcr.io/${{ env.OWNER }}/wadm:latest
ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION }},
ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION_DOCKER_TAG }}
- name: Build and push wolfi (tag)
uses: docker/build-push-action@v6
Expand All @@ -238,7 +246,10 @@ jobs:
build-args: |
BIN_ARM64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-aarch64
BIN_AMD64=./artifacts/wadm-${{ env.RELEASE_VERSION }}-linux-amd64
tags: ghcr.io/${{ env.OWNER }}/wadm:latest-wolfi,ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION }}-wolfi
tags: |
ghcr.io/${{ env.OWNER }}/wadm:latest-wolfi
ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION }}-wolfi
ghcr.io/${{ env.OWNER }}/wadm:${{ env.RELEASE_VERSION_DOCKER_TAG }}-wolfi
- name: Build and push (main)
uses: docker/build-push-action@v6
Expand Down

0 comments on commit 6c425a1

Please sign in to comment.