Validate, publish and deploy Gramps Web / validate (push) Successful in 23s
Validate, publish and deploy Gramps Web / ensure-postgresql-image (push) Successful in 37s
Validate, publish and deploy Gramps Web / publish (push) Successful in 18s
Validate, publish and deploy Gramps Web / deploy (push) Failing after 21s
47 lines
1.8 KiB
YAML
47 lines
1.8 KiB
YAML
name: Build locale-enabled PostgreSQL
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Refresh the moving Bitnami PostgreSQL 18 base image weekly.
|
|
- cron: "23 3 * * 1"
|
|
|
|
env:
|
|
POSTGRES_IMAGE: registry.brunner.ninja/feedc0de/postgres-with-locales
|
|
POSTGRES_IMAGE_TAG: 18-locales
|
|
|
|
jobs:
|
|
build:
|
|
# Never run untrusted pull-request code directly on the host runner.
|
|
runs-on: linux_amd64
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build and test image
|
|
env:
|
|
COMMIT_SHA: ${{ gitea.sha }}
|
|
run: |
|
|
set -euo pipefail
|
|
podman build --pull=always \
|
|
--label "org.opencontainers.image.revision=${COMMIT_SHA}" \
|
|
--label "org.opencontainers.image.source=https://code.brunner.ninja/feedc0de/gramps-kubernetes" \
|
|
--tag "${POSTGRES_IMAGE}:${POSTGRES_IMAGE_TAG}" \
|
|
postgresql-image
|
|
podman run --rm --entrypoint bash "${POSTGRES_IMAGE}:${POSTGRES_IMAGE_TAG}" -ec \
|
|
'postgres --version | grep -E "PostgreSQL\) 18\."; locale -a | grep -Fx de_AT.utf8; locale -a | grep -Fx de_DE.utf8; locale -a | grep -Fx en_GB.utf8; locale -a | grep -Fx en_US.utf8'
|
|
- name: Publish image
|
|
if: gitea.event_name != 'pull_request'
|
|
env:
|
|
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
|
|
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
test -n "${QUAY_USERNAME}"
|
|
test -n "${QUAY_TOKEN}"
|
|
authfile="${RUNNER_TEMP}/quay-auth.json"
|
|
trap 'rm -f "${authfile}"' EXIT
|
|
printf '%s' "${QUAY_TOKEN}" | podman login registry.brunner.ninja \
|
|
--authfile "${authfile}" --username "${QUAY_USERNAME}" --password-stdin
|
|
podman push --authfile "${authfile}" \
|
|
"${POSTGRES_IMAGE}:${POSTGRES_IMAGE_TAG}"
|