Skip to content

Merge pull request #474 from groldan/feature/webui_shared_auth #502

Merge pull request #474 from groldan/feature/webui_shared_auth

Merge pull request #474 from groldan/feature/webui_shared_auth #502

# Builds and pushes docker images on main and tags
name: Build and Push Docker images
on:
push:
branches:
- main
paths:
- "Makefile"
- "pom.xml"
- ".github/workflows/build-and-push.yaml"
- "src/**"
tags:
- '*'
jobs:
build:
if: github.repository == 'geoserver/geoserver-cloud'
name: Build and Push
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Validate source code formatting
run: make lint
- name: Build without tests
run: |
make install
- name: Build images
run: |
make build-image
- name: Push images
run: |
make push-image
- name: Remove project jars from cached repository
run: |
rm -rf ~/.m2/repository/org/geoserver
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {}