From b760f049628858dccc6909ab59f46fcb015050c7 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Wed, 16 Oct 2024 14:05:24 +0200 Subject: [PATCH] fix(ci): latest docker tag targets the latest tag Until now, the latest was more a "dev" release, targeting the latest changes in the main branch instead of the latest stable release. --- .github/workflows/dockerhub.yml | 18 ++++++------------ .github/workflows/integration.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 893b39f..0a9f784 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -25,7 +25,7 @@ jobs: buildkitd-flags: --debug - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -36,20 +36,14 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - - - name: Set tag name - run: | - if [[ ${{ github.ref_type }} == "tag" ]]; then - echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV - else - echo "IMAGE_TAG=latest" >> $GITHUB_ENV - fi - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: push: true tags: | - b4bz/homer:${{env.IMAGE_TAG}} - ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} + b4bz/homer:latest + b4bz/homer:${{ github.ref_name }} + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ github.ref_name }} platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 516597b..c8df9bd 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -25,7 +25,7 @@ jobs: uses: actions/checkout@v4 - name: pnpm setup - uses: pnpm/action-setup@v3 + uses: pnpm/action-setup@v4 with: version: 9 - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4dc3d35..adf5246 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v4 - name: pnpm setup - uses: pnpm/action-setup@v3 + uses: pnpm/action-setup@v4 with: version: 9 -