From 9ff5cceabda84f811391e4c006488b7884f090dc Mon Sep 17 00:00:00 2001 From: Eric Promislow Date: Tue, 2 Jul 2024 13:34:41 -0700 Subject: [PATCH] Pull in Tom's changes to use tag instead of docker metadata. --- .github/workflows/release.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f1ff8579f..842537537 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -150,10 +150,6 @@ jobs: username: ${{ env.DOCKER_USERNAME }} password: ${{ env.DOCKER_PASSWORD }} - # setup tag name - - if: ${{ startsWith(github.ref, 'refs/tags/') }} - run: | - echo TAG_NAME=$(echo $GITHUB_REF | sed -e "s|refs/tags/||") >> $GITHUB_ENV - name: Build and push the webhook image id: build # https://github.com/docker/build-push-action/commit/ca052bb54ab0790a636c9b5f226502c73d547a25 @@ -194,12 +190,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: "${{ env.REPO }}/rancher-webhook" - - name: "Read vault secrets" uses: rancher-eio/read-vault-secrets@main with: @@ -215,8 +205,13 @@ jobs: username: ${{ env.DOCKER_USERNAME }} password: ${{ env.DOCKER_PASSWORD }} + # setup tag name + - if: ${{ startsWith(github.ref, 'refs/tags/') }} + run: | + echo TAG_NAME=$(echo $GITHUB_REF | sed -e "s|refs/tags/||") >> $GITHUB_ENV + - name: Create manifest list and push working-directory: /tmp/digests run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + docker buildx imagetools create -t ${{ env.REGISTRY }}/${{ env.REPO }}/rancher-webhook:${{ env.TAG_NAME }} \ $(printf '${{ env.REPO }}/rancher-webhook@sha256:%s ' *)