From 59a23f424eb2de7e5b71a7a5e5fca3051edef33b Mon Sep 17 00:00:00 2001 From: Simon Ledoux Date: Mon, 5 Feb 2024 13:16:59 +0100 Subject: [PATCH 1/2] refactor: Upgrade image build process for multi-architecture support --- .github/workflows/image.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 67c4ffb..19b6db0 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -14,11 +14,25 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build image - run: docker image build -f Containerfile --tag ghcr.io/vanilla-os/differ:main . + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Publish image - if: github.repository == 'Vanilla-OS/Differ' && github.ref == 'refs/heads/main' - run: | - docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }} - docker image push "ghcr.io/vanilla-os/differ:main" + - name: Login to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + provenance: false + context: . + file: Containerfile + platforms: linux/amd64,linux/arm64 + push: ${{ github.repository == 'simon511000/Differ' && github.ref == 'refs/heads/main' }} + tags: ghcr.io/simon511000/differ:main From 940b7e1d21ccf02aa83c7aef436784270cb220c6 Mon Sep 17 00:00:00 2001 From: Simon Ledoux Date: Mon, 5 Feb 2024 13:32:25 +0100 Subject: [PATCH 2/2] revert to Vanilla-OS namespace --- .github/workflows/image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 19b6db0..6d40644 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -34,5 +34,5 @@ jobs: context: . file: Containerfile platforms: linux/amd64,linux/arm64 - push: ${{ github.repository == 'simon511000/Differ' && github.ref == 'refs/heads/main' }} - tags: ghcr.io/simon511000/differ:main + push: ${{ github.repository == 'Vanilla-OS/Differ' && github.ref == 'refs/heads/main' }} + tags: ghcr.io/vanilla-os/differ:main