Correctly move multi-arch images from Docker Hub to Quay.io #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Move some images from Docker Hub to Quay.io | |
env: | |
OWNER: ${{ github.repository_owner }} | |
PUSH_TO_REGISTRY: ${{ (github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru') && (github.ref == 'refs/heads/main') }} | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/registry-move.yml" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/registry-move.yml" | |
workflow_dispatch: | |
jobs: | |
update-overview: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' | |
steps: | |
- name: Checkout Repo ⚡️ | |
uses: actions/checkout@v4 | |
- name: Pull single-arch image from Docker Hub 📥 | |
run: | | |
docker pull ${{ env.OWNER }}/${{ matrix.image }}:aarch64-${{ matrix.tag }} | |
docker pull ${{ env.OWNER }}/${{ matrix.image }}:x86_64-${{ matrix.tag }} | |
- name: Login to Quay.io 🔐 | |
if: env.PUSH_TO_REGISTRY == 'true' | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
- name: Push single-user images to Quay.io 🐳 | |
if: env.PUSH_TO_REGISTRY == 'true' | |
run: | | |
docker tag ${{ env.OWNER }}/${{ matrix.image }}:aarch64-${{ matrix.tag }} quay.io/${{ env.OWNER }}/${{ matrix.image }}:aarch64-${{ matrix.tag }} | |
docker push quay.io/${{ env.OWNER }}/${{ matrix.image }}:aarch64-${{ matrix.tag }} | |
docker tag ${{ env.OWNER }}/${{ matrix.image }}:x86_64-${{ matrix.tag }} quay.io/${{ env.OWNER }}/${{ matrix.image }}:x86_64-${{ matrix.tag }} | |
docker push quay.io/${{ env.OWNER }}/${{ matrix.image }}:x86_64-${{ matrix.tag }} | |
- name: Merge single-user images to create multi-arch image 🐳 | |
if: env.PUSH_TO_REGISTRY == 'true' | |
run: | | |
docker manifest create quay.io/${{ env.OWNER }}/${{ matrix.image }} \ | |
quay.io/${{ env.OWNER }}/${{ matrix.image }}:aarch64-${{ matrix.tag }} \ | |
quay.io/${{ env.OWNER }}/${{ matrix.image }}:x86_64-${{ matrix.tag }} | |
docker manifest push quay.io/${{ env.OWNER }}/${{ matrix.image }} | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
[ | |
docker-stacks-foundation, | |
base-notebook, | |
minimal-notebook, | |
scipy-notebook, | |
r-notebook, | |
julia-notebook, | |
tensorflow-notebook, | |
datascience-notebook, | |
pyspark-notebook, | |
all-spark-notebook, | |
] | |
tag: [4d70cf8da953] |