Skip to content

Docker Image CI

Docker Image CI #419

Workflow file for this run

name: Docker Image CI
on:
schedule:
- cron: '0 5 * * *'
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
bld-and-push:
strategy:
matrix:
version: ['13', '14', '15', '16']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build the Docker image
if: matrix.version != '15.2'
run: docker build . --build-arg POSTGRES_VERSION=${{ matrix.version }} -t ${{ vars.DOCKER_REG }}/pg_dump:${{ matrix.version }} --file Dockerfile
- name: Build the latest Docker image
if: matrix.version == '15.2'
run: docker build . --build-arg POSTGRES_VERSION=${{ matrix.version }} -t ${{ vars.DOCKER_REG }}/pg_dump:${{ matrix.version }} -t ${{ vars.DOCKER_REG }}/pg_dump:latest --file Dockerfile
- name: Log into docker.io
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: docker.io
username: ${{ vars.DOCKER_REG }}
password: ${{ secrets.DOCKER_PAT }}
- name: Push the Docker image
run: docker push ${{ vars.DOCKER_REG }}/pg_dump:${{ matrix.version }}