-
Notifications
You must be signed in to change notification settings - Fork 79
59 lines (51 loc) · 1.36 KB
/
build-and-push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# 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"
- "geoserver_submodule/**"
- "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: '17'
cache: 'maven'
- name: Validate source code formatting
run: make lint
- name: Build customized GeoServer version
run: |
make deps
- name: Build without tests
run: |
make install
- name: Build and push Hotspot docker images
run: |
make build-image SKIP_PUSH=false
- name: Remove project jars from cached repository
run: |
rm -rf ~/.m2/repository/org/geoserver
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {}