From db6baf1a3b6640bd603ae9cbcf2e840e5ca09d4a Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 24 Jun 2024 23:20:30 +0200 Subject: [PATCH] Add multi platform docker images. --- .github/workflows/docker.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2f106bbcfd..97e22a0fb2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - ubuntu_version: [focal, jammy] + ubuntu_version: [jammy] # Use only 1 job to build, as more jobs # would starve the github machine for memory. include: @@ -31,6 +31,9 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -40,6 +43,13 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push Docker image of master ${{ matrix.ubuntu_version }} uses: docker/build-push-action@v6 with: @@ -50,5 +60,8 @@ jobs: IMG=${{ matrix.ubuntu_version }} NJOBS=${{ matrix.n_jobs }} VER=master + platforms: linux/arm64,linux/amd64 push: ${{ github.event_name == 'schedule' }} - tags: dealii/dealii:master-${{ matrix.ubuntu_version }} + tags: | + dealii/dealii:master-${{ matrix.ubuntu_version }} + ghcr.io/${{ github.repository }}:master-${{ matrix.ubuntu_version }} -- 2.39.5