Skip to content

Commit 9bda3b8

Browse files
authored
Re-enabled dockerhub push on PR merge (#214)
* Re-enabled dockerhub push on PR merge * - Added step based on docker's github action for logging into dockerhub * - Added github actions build status badge to README.md
1 parent cb70fd2 commit 9bda3b8

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ defaults:
1111
shell: bash
1212

1313
jobs:
14+
1415
make-docker-images:
1516
strategy:
1617
matrix:
@@ -41,10 +42,18 @@ jobs:
4142
- name: Build docker image for ${{ env.VERSION }} ${{ env.VARIANT }}
4243
run: make test
4344

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
45+
- name: Login to dockerhub
46+
uses: docker/login-action@v1
47+
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
48+
with:
49+
username: ${{ secrets.DOCKERHUB_USERNAME }}
50+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
51+
52+
- name: Push docker image to dockerhub
53+
if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }}
54+
env:
55+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
56+
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
57+
DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
58+
run: make push
5059

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# postgis/postgis
22

3-
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3+
[![Build Status](https://github.com/postgis/docker-postgis/workflows/Docker%20PostGIS%20CI/badge.svg)](https://github.com/postgis/docker-postgis/actions) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44

55
The `postgis/postgis` image provides tags for running Postgres with [PostGIS](http://postgis.net/) extensions installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides debian and alpine variants for PostGIS both 2.5.x and 3.0.x for each supported version of Postgres (9.5, 9.6, 10, 11, and 12). Additionally, an image version is provided which is built from the latest version of Postgres (12) with versions of PostGIS and its dependencies built from their respective master branches.
66

0 commit comments

Comments
 (0)