Skip to content

Commit 96d5b92

Browse files
committed
Updating CI with following docker-postgis Makefile
Comment out matrix to match existing folders for test
1 parent 0935532 commit 96d5b92

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ name: Docker pgRouting CI
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- develop
85
pull_request:
9-
branches:
10-
- main
11-
- develop
126
schedule:
137
- cron: '15 5 * * 1'
148

@@ -20,38 +14,40 @@ jobs:
2014
make-docker-images:
2115
strategy:
2216
matrix:
23-
postgres: [12, 13, 14, 15, 16, 17]
24-
postgis: [3.4, 3.5]
25-
pgrouting: [develop, main, 3.5, 3.6, 3.7]
17+
postgres: [16] # [12, 13, 14, 15, 16, 17]
18+
postgis: [3.4] # [3.4, 3.5]
19+
pgrouting: [3.5, 3.6] # [develop, main, 3.5, 3.6, 3.7]
20+
# exclude:
21+
# - postgres: 12
22+
# pgrouting: 3.7
23+
# - postgres: 12
24+
# pgrouting: main
25+
# - postgres: 12
26+
# pgrouting: develop
2627

2728
name: Build Docker image for ${{ matrix.postgres }}-${{ matrix.postgis }}-${{ matrix.pgrouting }}
2829
runs-on: ubuntu-20.04
29-
continue-on-error: ${{ matrix.pgrouting == 'develop' }}
30+
continue-on-error: ${{ (matrix.pgrouting == 'develop') || (matrix.pgrouting == 'main') }}
3031
env:
31-
POSTGRES_VERSION: ${{ matrix.postgres }}
32-
POSTGIS_VERSION: ${{ matrix.postgis }}
33-
PGROUTING_VERSION: ${{ matrix.pgrouting }}
32+
VERSION: ${{ matrix.postgres }}-${{ matrix.postgis }}-${{ matrix.pgrouting }}
3433

3534
steps:
3635
- name: Checkout source
3736
uses: actions/checkout@v4
3837

39-
- name: Build docker image for ${{ env.POSTGRES_VERSION }}-${{ env.POSTGIS_VERSION }}-${{ env.PGROUTING_VERSION }}
40-
run: |
41-
docker build \
42-
--build-arg POSTGRES_VERSION=${{ env.POSTGRES_VERSION }} \
43-
--build-arg POSTGIS_VERSION=${{ env.POSTGIS_VERSION }} \
44-
--build-arg PGROUTING_VERSION=${{ env.PGROUTING_VERSION }} \
45-
-t pgrouting/pgrouting:${{ env.POSTGRES_VERSION }}-${{ env.POSTGIS_VERSION }}-${{ env.PGROUTING_VERSION }} .
38+
- name: Build docker image for ${{ env.VERSION }}
39+
run: make build
4640

4741
- name: Login to Docker Hub
4842
uses: docker/login-action@v3
49-
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
43+
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
5044
with:
5145
username: ${{ secrets.DOCKERHUB_USERNAME }}
5246
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
5347

5448
- name: Push docker image to Docker Hub
55-
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
56-
run: |
57-
docker push pgrouting/pgrouting:${{ env.POSTGRES_VERSION }}-${{ env.POSTGIS_VERSION }}-${{ env.PGROUTING_VERSION }}
49+
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
50+
env:
51+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
52+
DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
53+
run: make push

0 commit comments

Comments
 (0)