-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54c606e
commit 5f77a8e
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: publishpublish | ||
run-name: ${{ github.actor }} build new image | ||
on: [push] | ||
jobs: | ||
publish-postgres-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build the Postgres 13 Docker image | ||
run: | | ||
timetag=(`date +%Y%M%d`) | ||
docker build . --tag ghcr.io/viraweb123/docker-postgres:13.${timetag} --tag ghcr.io/viraweb123/docker-postgres:13 | ||
docker push ghcr.io/viraweb123/docker-postgres:13 | ||
docker push ghcr.io/viraweb123/docker-postgres:13.${timetag} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM postgres:13 | ||
|
||
# Install PostGIS | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
postgresql-13-postgis-3 \ | ||
postgresql-13-postgis-3-scripts \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Create the PostGIS extension | ||
RUN mkdir -p "/docker-entrypoint-initdb.d" \ | ||
&& echo "CREATE EXTENSION IF NOT EXISTS postgis;" > /docker-entrypoint-initdb.d/postgis_o125.sql |