From d57bba8edd35badaa985230df86a24a5d8efea05 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:49:56 -0400 Subject: [PATCH] ci(tags): do not tag images as 'latest' (backport #1940) (#1941) * ci(tags): do not tag images as 'latest' (#1940) (cherry picked from commit 62cc0e4d0f12858d7443ac078ec6c889202083d6) # Conflicts: # .github/workflows/push-ci.yml * resolve conflicts * fixup! resolve conflicts --------- Co-authored-by: Andrew Azores --- .github/workflows/push-ci.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index 26be4c453d..3023981234 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -50,7 +50,7 @@ jobs: IMAGE_VERSION: ${{ needs.build-and-test-amd64.outputs.image-version }} run: | podman load -i cryostat-amd64.tar - podman tag quay.io/cryostat/cryostat:latest $CRYOSTAT_IMG:$IMAGE_VERSION-linux-amd64 + podman tag $CRYOSTAT_IMG:$IMAGE_VERSION-linux-amd64 if: github.repository_owner == 'cryostatio' - uses: actions/download-artifact@v3 with: @@ -61,7 +61,7 @@ jobs: IMAGE_VERSION: ${{ needs.build-and-test-arm64.outputs.image-version }} run: | podman load -i cryostat-arm64.tar - podman tag quay.io/cryostat/cryostat:latest $CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 + podman tag $CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 if: github.repository_owner == 'cryostatio' - name: Create OCI Manifest id: create-manifest @@ -69,14 +69,7 @@ jobs: IMAGE_VERSION: ${{ needs.build-and-test-amd64.outputs.image-version }} run: | podman manifest create $CRYOSTAT_IMG:$IMAGE_VERSION containers-storage:$CRYOSTAT_IMG:$IMAGE_VERSION-linux-amd64 containers-storage:$CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 - if [ "$GITHUB_REF" == "refs/heads/main" ]; then - podman tag \ - ${{ env.CRYOSTAT_IMG }}:$IMAGE_VERSION \ - ${{ env.CRYOSTAT_IMG }}:latest - echo "tags=$IMAGE_VERSION latest" >> "$GITHUB_OUTPUT" - else - echo "tags=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" - fi + echo "tags=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" if: github.repository_owner == 'cryostatio' - name: Push to quay.io uses: redhat-actions/push-to-registry@v2