Skip to content

Commit

Permalink
ci(publish): push to quay.io (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcoatl authored Jul 29, 2024
1 parent a0e75de commit 5eb0d4e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 26 deletions.
57 changes: 43 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ on:
schedule:
- cron: '30 20 * * 1,5'

env:
REGISTRY_IMAGE: coatldev/devpi

jobs:
semver:
tagger:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.tags.outputs.version }}
Expand Down Expand Up @@ -40,16 +43,42 @@ jobs:
echo "major_minor=${MAJOR_MINOR}" >> $GITHUB_OUTPUT
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
publish:
needs: semver
uses: coatl-dev/workflows/.github/workflows/docker-publish-multi-platform.yml@v4
with:
registry-image: coatldev/devpi
metadata-tags: |
type=raw,value=${{ needs.semver.outputs.version }}
type=raw,value=${{ needs.semver.outputs.major_minor }}
type=raw,value=${{ needs.semver.outputs.major }}
type=raw,value=latest,enable={{is_default_branch}}
dockerhub-username: ${{ vars.DOCKERHUB_USERNAME }}
secrets:
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
build:
needs: tagger
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to Quay
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REGISTRY_IMAGE }}:${{ needs.tagger.outputs.version }}
${{ env.REGISTRY_IMAGE }}:${{ needs.tagger.outputs.major_minor }}
${{ env.REGISTRY_IMAGE }}:${{ needs.tagger.outputs.major }}
${{ env.REGISTRY_IMAGE }}:latest
quay.io/${{ env.REGISTRY_IMAGE }}:${{ needs.tagger.outputs.version }}
quay.io/${{ env.REGISTRY_IMAGE }}:${{ needs.tagger.outputs.major_minor }}
quay.io/${{ env.REGISTRY_IMAGE }}:${{ needs.tagger.outputs.major }}
quay.io/${{ env.REGISTRY_IMAGE }}:latest
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ENV VIRTUAL_ENV=/env
RUN set -eux; \
\
apt-get update --quiet; \
apt-get upgrade --yes; \
apt-get install --yes --no-install-recommends \
procps \
; \
Expand Down
12 changes: 0 additions & 12 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ build==1.2.1
# via -r test.in
certifi==2024.7.4
# via requests
cffi==1.16.0
# via cryptography
charset-normalizer==3.3.2
# via requests
cryptography==43.0.0
# via secretstorage
docutils==0.21.2
# via readme-renderer
idna==3.7
Expand All @@ -26,10 +22,6 @@ jaraco-context==5.3.0
# via keyring
jaraco-functools==4.0.1
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
keyring==25.2.1
# via twine
markdown-it-py==3.0.0
Expand All @@ -46,8 +38,6 @@ packaging==24.1
# via build
pkginfo==1.10.0
# via twine
pycparser==2.22
# via cffi
pygments==2.18.0
# via
# readme-renderer
Expand All @@ -66,8 +56,6 @@ rfc3986==2.0.0
# via twine
rich==13.7.1
# via twine
secretstorage==3.3.3
# via keyring
twine==5.1.1
# via -r test.in
urllib3==2.2.2
Expand Down

0 comments on commit 5eb0d4e

Please sign in to comment.