Skip to content

Commit cb70fd2

Browse files
authored
Merge pull request #213 from phillipross/feature/ci
CI: Disable travis-ci and enable github actions
2 parents 69856e1 + baea931 commit cb70fd2

File tree

4 files changed

+65
-11
lines changed

4 files changed

+65
-11
lines changed

.github/workflows/main.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Docker PostGIS CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '15 5 * * 1'
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
make-docker-images:
15+
strategy:
16+
matrix:
17+
postgres: [9.5, 9.6, 10, 11, 12, 13]
18+
postgis: ['2.5', '3.0']
19+
variant: [default, alpine]
20+
exclude:
21+
- postgres: 13
22+
postgis: '2.5'
23+
include:
24+
- postgres: 12
25+
postgis: master
26+
variant: default
27+
- postgres: 13
28+
postgis: master
29+
variant: default
30+
name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }}
31+
runs-on: ubuntu-20.04
32+
continue-on-error: ${{ matrix.postgis == 'master' }}
33+
env:
34+
VERSION: ${{ matrix.postgres }}-${{ matrix.postgis }}
35+
VARIANT: ${{ matrix.variant }}
36+
37+
steps:
38+
- name: Checkout source
39+
uses: actions/checkout@v2
40+
41+
- name: Build docker image for ${{ env.VERSION }} ${{ env.VARIANT }}
42+
run: make test
43+
44+
# - name: Push docker image to dockerhub
45+
# env:
46+
# DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
47+
# DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
48+
# DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
49+
# run: echo "$DOCKERHUB_ACCESS_TOKEN" | docker login -u $DOCKERHUB_USERNAME --password-stdin && make push
50+
File renamed without changes.

Makefile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@ do_default=true
1212
do_alpine=true
1313

1414
# The following logic evaluates VERSION and VARIANT variables that may have
15-
# been previously specified, and unsets the "do" flags depending on the values.
15+
# been previously specified, and modifies the "do" flags depending on the values.
1616
# The VERSIONS variable is also set to contain the version(s) to be processed.
1717
ifdef VERSION
18-
VERSIONS=$(VERSION) # If a version was speciefied, VERSIONS only contains the specified version
19-
ifdef VARIANT
20-
do_default=false # If a variant was specified as an environment variable, don't process the default
21-
ifneq ($(VARIANT),alpine)
22-
do_alpine=false # If alpine variant was specified as an environment variable, process the alpine variant
18+
VERSIONS=$(VERSION) # If a version was specified, VERSIONS only contains the specified version
19+
ifdef VARIANT # If a variant is specified, unset all do flags and allow subsequent logic to set them again where appropriate
20+
do_default=false
21+
do_alpine=false
22+
ifeq ($(VARIANT),default)
23+
do_default=true
24+
endif
25+
ifeq ($(VARIANT),alpine)
26+
do_alpine=true
2327
endif
24-
else
25-
do_alpine=false # If no variant was specified, don't process the alpine variant
2628
endif
27-
ifeq ("$(wildcard $(VERSION)/alpine)","")
28-
do_alpine=false # If no alpine subdirectory exists, don't process the alpine version
29+
ifeq ("$(wildcard $(VERSION)/alpine)","") # If no alpine subdirectory exists, don't process the alpine version
30+
do_alpine=false
2931
endif
3032
else # If no version was specified, VERSIONS should contain all versions
3133
VERSIONS = $(foreach df,$(wildcard */Dockerfile),$(df:%/Dockerfile=%))

update.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,7 @@ for version in "${versions[@]}"; do
107107

108108
done
109109
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
110-
echo "$travis" > .travis.yml
110+
111+
# *** TRAVIS IS DISABLED FOR NOW ***
112+
#echo "$travis" > .travis.yml
111113

0 commit comments

Comments
 (0)