diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b611fc46..588f9618c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,9 +5,22 @@ on: branches: - 'master' +env: + VERSION: '15-3.4' + DOCKER_IMAGE: 'ghcr.io/jobrad-gmbh/postgis:15-3.4-alpine' + jobs: build-docker: - runs-on: ubuntu-20.04 + strategy: + matrix: + include: + - runner: ubuntu-20.04 + platform: linux/amd64 + suffix: amd64 + - runner: Linux-ARM64-2C-8GB + platform: linux/arm64 + suffix: arm64 + runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v3 @@ -18,8 +31,21 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: 13-3.4/alpine/Dockerfile - platforms: linux/amd64,linux/arm64 + file: ${{ env.VERSION }}/alpine/Dockerfile + platforms: ${{ matrix.platform }} push: true tags: | - ghcr.io/jobrad-gmbh/postgis:13-3.4-alpine + ${{ env.DOCKER_IMAGE }}-${{ matrix.suffix }} + provenance: false + + combine-docker: + runs-on: ubuntu-latest + needs: build-docker + steps: + - uses: int128/docker-manifest-create-action@v2 + with: + tags: ${{ env.DOCKER_IMAGE }} + sources: | + ${{ env.DOCKER_IMAGE }}-amd64 + ${{ env.DOCKER_IMAGE }}-arm64 + push: true