Skip to content

Commit

Permalink
Pull in Tom's changes to use tag instead of docker metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpromislow committed Jul 2, 2024
1 parent 91e7f18 commit 9ff5cce
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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 ' *)

0 comments on commit 9ff5cce

Please sign in to comment.