diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 296f617840..702184a4f4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,49 +2,40 @@ name: Docker Image on: push: - branches: [ development ] + branches: [ master, development ] + pull_request: + branches: [ master, development ] 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 + push: ${{ github.ref == 'refs/heads/development' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}