Skip to content

Commit

Permalink
Update the workflow and the version
Browse files Browse the repository at this point in the history
  • Loading branch information
borna-ng committed Oct 10, 2024
1 parent f8bbcc8 commit c80504f
Showing 1 changed file with 44 additions and 4 deletions.
48 changes: 44 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,61 @@ 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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
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:
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: int128/docker-manifest-create-action@v2
with:
tags: ${{ env.DOCKER_IMAGE }}
sources: |
${{ env.DOCKER_IMAGE }}-amd64
${{ env.DOCKER_IMAGE }}-arm64
push: true

0 comments on commit c80504f

Please sign in to comment.