Skip to content

chore: update pgbackrest and extract config files #101

chore: update pgbackrest and extract config files

chore: update pgbackrest and extract config files #101

Workflow file for this run

name: Database
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
init-check:
name: Init check
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: wowmuchsecret
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Init check
env:
PGHOST: localhost
PGPORT: ${{ job.services.postgres.ports[5432] }}
POSTGRES_USER: postgres
PGPASSWORD: wowmuchsecret
POSTGRES_DB: heltin
run: database/init.sh
release:
name: Release
if: github.ref == 'refs/heads/main'
needs: [init-check]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v2
with:
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
targets: database
push: true