Skip to content

Use a multiplatform postgis docker image for the sample docker compos… #147

Use a multiplatform postgis docker image for the sample docker compos…

Use a multiplatform postgis docker image for the sample docker compos… #147

# Builds and pushes docker images on main and tags
name: Build and Push Docker image
on:
push:
branches:
- main
tags:
- '*'
jobs:
build:
if: github.repository == 'geoserver/geoserver-acl'
name: Build and Push
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# Add support for more platforms with QEMU
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# https://github.com/docker/setup-buildx-action
with:
platforms: linux/amd64,linux/arm64
# Sets up docker build command as an alias to docker buildx
install: true
- name: Package
run: ./mvnw clean package -DskipTests -U -ntp -pl :gs-acl-service -am
- name: Set version tag
run: echo "TAG=$(./mvnw help:evaluate -q -DforceStdout -Dexpression=project.version)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
context: ./src/artifacts/api
tags: geoservercloud/geoserver-acl:${{ env.TAG }}