Skip to content

Build

Build #16

Workflow file for this run

name: Build Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
id: docker-cache
uses: actions/cache@v3
with:
path: /tmp/docker_cache_*
key: postgres
# - name: Log in to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Run Postgres build script
run: ./ci-build-postgres.sh ${{ steps.docker-cache.outputs.cache-hit }}
# - name: Build Postgres debug image
# uses: docker/build-push-action@v4
# with:
# context: ./postgres
# file: ./postgres/Dockerfile
# push: false
# load: true
# tags: pg-ferret-postgres-16:latest
# - name: Build and push Docker image
# uses: docker/build-push-action@v4
# with:
# context: .
# push: true
# tags: ${{ secrets.DOCKER_USERNAME }}/pg-ferret:latest
- name: Logout from Docker Hub
run: docker logout