Skip to content

Commit 094451f

Browse files
authored
ci(release): push images to Docker Hub alongside Quay (#743)
Quay keeps no lifetime pull counter — only daily rows, exposed for a trailing 92 days (MAX_DAYS_IN_3_MONTHS in quay/quay). Docker Hub keeps a monotonic one, and lakhansamani/authorizer already holds 5 years of it, stalled since v2.2.1 when releases went Quay-only. One buildx invocation carries both tag sets, so digests match and build time is unchanged. Buildcache stays on Quay alone. Reuses the existing DOCKER_USERNAME/DOCKER_PASSWORD secrets from when releases last shipped to Docker Hub.
1 parent 36ca2c4 commit 094451f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919

2020
env:
2121
DOCKER_IMAGE: quay.io/authorizer/authorizer
22+
# Quay exposes no lifetime pull counter (only a trailing 92-day window), so
23+
# the same image also goes to Docker Hub, which does.
24+
DOCKERHUB_IMAGE: docker.io/lakhansamani/authorizer
2225
BUILDKIT_INLINE_CACHE: 1
2326

2427
jobs:
@@ -68,16 +71,21 @@ jobs:
6871
registry: quay.io
6972
username: ${{ secrets.QUAY_USERNAME }}
7073
password: ${{ secrets.QUAY_PASSWORD }}
74+
- name: Log in to Docker Hub
75+
uses: docker/login-action@v4
76+
with:
77+
username: ${{ secrets.DOCKER_USERNAME }}
78+
password: ${{ secrets.DOCKER_PASSWORD }}
7179
- name: Build and push
7280
env:
7381
SOURCE_URL: https://github.com/${{ github.repository }}
7482
run: |
7583
VERSION=$(basename ${GITHUB_REF})
76-
TAG_ARGS=(-t "${DOCKER_IMAGE}:${VERSION}")
84+
TAG_ARGS=(-t "${DOCKER_IMAGE}:${VERSION}" -t "${DOCKERHUB_IMAGE}:${VERSION}")
7785
# Only a final release moves :latest. Match strict semver with no
7886
# pre-release suffix (vX.Y.Z / X.Y.Z) so rc/beta/alpha/pre never win.
7987
if [[ "$VERSION" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
80-
TAG_ARGS+=(-t "${DOCKER_IMAGE}:latest")
88+
TAG_ARGS+=(-t "${DOCKER_IMAGE}:latest" -t "${DOCKERHUB_IMAGE}:latest")
8189
fi
8290
docker buildx build \
8391
--platform linux/amd64,linux/arm64 \

0 commit comments

Comments
 (0)