-
Notifications
You must be signed in to change notification settings - Fork 462
62 lines (52 loc) · 1.65 KB
/
main.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
61
name: Docker PostGIS CI
on:
push:
pull_request:
schedule:
- cron: '15 5 * * 1'
defaults:
run:
shell: bash
jobs:
make-docker-images:
strategy:
matrix:
postgres: [11, 12, 13, 14, 15]
postgis: ['3.3']
variant: [default, alpine]
include:
- postgres: 14
postgis: master
variant: default
- postgres: 15
postgis: master
variant: default
- postgres: 16beta1
postgis: master
variant: default
- postgres: 16beta1
postgis: 3.3.3
variant: alpine
name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }}
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.postgis == 'master' }}
env:
VERSION: ${{ matrix.postgres }}-${{ matrix.postgis }}
VARIANT: ${{ matrix.variant }}
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Build docker image for ${{ env.VERSION }} ${{ env.VARIANT }}
run: make test
- name: Login to dockerhub
uses: docker/login-action@v1
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Push docker image to dockerhub
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
run: make push