From a257a696a6e082c7dec98317730790150988f531 Mon Sep 17 00:00:00 2001 From: Robert Fairburn <8029478+rfairburn@users.noreply.github.com> Date: Wed, 5 Apr 2023 12:04:34 -0500 Subject: [PATCH] Ensure that short tags push to quay in addition to dockerhub (#11006) This should include the short tags (such as `fleetdm/fleet:43e434b`) when pushing to quay.io (`quay.io/fleetdm/fleet:43e434b`) Additionally, the previous `docker buildx imagetools create` line was only pushing a linux/amd64 image to quay. This means that for these tags, one could not pull from quay on an arm64 Mac for example. This update should correct that. --- .github/workflows/goreleaser-fleet.yaml | 3 ++- .github/workflows/goreleaser-snapshot-fleet.yaml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/goreleaser-fleet.yaml b/.github/workflows/goreleaser-fleet.yaml index 1b0e3437ca..0acd94f165 100644 --- a/.github/workflows/goreleaser-fleet.yaml +++ b/.github/workflows/goreleaser-fleet.yaml @@ -76,5 +76,6 @@ jobs: - name: Tag and push to quay.io run: | for TAG in ${{ steps.docker.outputs.TAG }}; do - docker buildx imagetools create --tag quay.io/fleetdm/fleet:${TAG} fleetdm/fleet:${TAG} + docker tag fleetdm/fleet:${TAG} quay.io/fleetdm/fleet:${TAG} + docker push quay.io/fleetdm/fleet:${TAG} done diff --git a/.github/workflows/goreleaser-snapshot-fleet.yaml b/.github/workflows/goreleaser-snapshot-fleet.yaml index dbee2eb983..d10163e5cc 100644 --- a/.github/workflows/goreleaser-snapshot-fleet.yaml +++ b/.github/workflows/goreleaser-snapshot-fleet.yaml @@ -60,7 +60,7 @@ jobs: - name: Get tag run: | - echo "TAG=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_OUTPUT + echo "TAG=$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT id: docker - name: List tags for push @@ -77,5 +77,6 @@ jobs: - name: Tag and push to quay.io run: | for TAG in ${{ steps.docker.outputs.TAG }}; do - docker buildx imagetools create --tag quay.io/fleetdm/fleet:${TAG} fleetdm/fleet:${TAG} + docker tag fleetdm/fleet:${TAG} quay.io/fleetdm/fleet:${TAG} + docker push quay.io/fleetdm/fleet:${TAG} done