From a2b9ba25f413489befe405d0a914fcc5357c5c9b Mon Sep 17 00:00:00 2001 From: Lucas Briese Date: Tue, 4 Mar 2025 12:14:04 +0100 Subject: [PATCH 1/2] ci: switch from qemu-arm to arm runner --- .github/workflows/docker.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 296f617840..af358812f0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,44 +7,33 @@ on: jobs: push_to_registries: name: Push Docker image to multiple registries - runs-on: ubuntu-24.04 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-24.04, ubuntu-24.04-arm] permissions: packages: write contents: read steps: - name: Check out the repo 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 - # If we want to publish an image of PhASAR to the official docker hub we - # can just use the following code and set the corresponding secrets. - # - name: Log in to Docker Hub - # uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - # with: - # username: ${{ secrets.DOCKER_USERNAME }} - # password: ${{ secrets.DOCKER_TOKEN }} - - name: Log in to the Container registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.repository }} - # here we could add a second image for the official docker registry - # sse/phasar - name: Build and push Docker images uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 3e4a2636cc624c37531615f49f987e54fe150688 Mon Sep 17 00:00:00 2001 From: Lucas Briese Date: Tue, 4 Mar 2025 12:18:17 +0100 Subject: [PATCH 2/2] ci: build dockerimage on each pull request --- .github/workflows/docker.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index af358812f0..702184a4f4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,9 @@ name: Docker Image on: push: - branches: [ development ] + branches: [ master, development ] + pull_request: + branches: [ master, development ] jobs: push_to_registries: @@ -34,6 +36,6 @@ jobs: uses: docker/build-push-action@v6 with: context: . - push: true + push: ${{ github.ref == 'refs/heads/development' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}