-
Notifications
You must be signed in to change notification settings - Fork 11
60 lines (45 loc) · 1.68 KB
/
docker-image.yml
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
60
name: Docker Image CI
on:
push:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
max-parallel: 2
fail-fast: false
matrix:
version: [ 2.24, 2.23, 2.22, 2.21, '2.20', 2.19, 2.18, 2.17, 2.16, 2.15 ]
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
- name: docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: docker build
run: docker build . --tag meteofi/geoserver:${{ matrix.version }} --tag meteofi/geoserver:$(grep -Po '(?<=GEOSERVER_VERSION\=\")\d.\d+.\d+' Dockerfile)
- if: ${{ matrix.version == '2.24' }}
name: docker tag latest stable
run: |
docker tag meteofi/geoserver:${{ matrix.version }} meteofi/geoserver:latest
docker tag meteofi/geoserver:${{ matrix.version }} meteofi/geoserver:stable
- if: ${{ matrix.version == '2.23' }}
name: docker tag maintenance
run: docker tag meteofi/geoserver:${{ matrix.version }} meteofi/geoserver:maintenance
- name: docker compose up
run: docker compose up -d --wait --wait-timeout 300
- name: curl geoserver
run: curl --silent --show-error --fail --include "http://localhost:8080/geoserver/wms?request=getCapabilities&service=WMS"
- name: docker logs geoserver
run: docker logs geoserver
- name: docker compose down
run: docker compose down
- name: docker push
run: docker push --all-tags meteofi/geoserver