chore(ci): host prop-base on codeberg.org

Move the runtime base image from git.mcintire.me/graham/prop-base
to codeberg.org/gmcintire/prop-base. The shared REGISTRY_USER /
REGISTRY_PASSWORD secrets are pointed at Codeberg credentials;
the build-base workflow hardcodes env.REGISTRY=codeberg.org so it
can't accidentally push to a different registry if the URL secret
drifts.

The main app + prop-grid-rs builds still pull this base via the
BASE_IMAGE arg in Dockerfile, now codeberg.org/gmcintire/prop-base:latest.
This commit is contained in:
Graham McIntire 2026-05-05 10:22:31 -05:00
parent 1c6e9005d1
commit 4f4d9e44fc
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
2 changed files with 17 additions and 6 deletions

View file

@ -22,9 +22,14 @@ on:
- cron: '0 6 * * 0' - cron: '0 6 * * 0'
workflow_dispatch: workflow_dispatch:
# Base image lives on Codeberg's container registry. The shared
# REGISTRY_USER / REGISTRY_PASSWORD secrets are set to Codeberg
# credentials; the registry URL is hardcoded here rather than read
# from secrets.REGISTRY_URL so the workflow can't accidentally push
# to a different registry if that secret drifts.
env: env:
REGISTRY: git.mcintire.me REGISTRY: codeberg.org
IMAGE_NAME: graham/prop-base IMAGE_NAME: gmcintire/prop-base
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
@ -90,13 +95,19 @@ jobs:
TAG="wgrib2-${WGRIB2}-g2c-${G2C}-${TIMESTAMP}" TAG="wgrib2-${WGRIB2}-g2c-${G2C}-${TIMESTAMP}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Log in to container registry - name: Log in to Codeberg container registry
run: | run: |
# Reuses the shared REGISTRY_USER / REGISTRY_PASSWORD
# Forgejo Actions secrets — already set with Codeberg
# credentials (token must have `write:package` scope).
# Login URL is the hardcoded env.REGISTRY rather than
# secrets.REGISTRY_URL so this workflow can't accidentally
# push to whatever registry the URL secret points at.
attempt=1 attempt=1
max_attempts=3 max_attempts=3
while : ; do while : ; do
if echo "${{ secrets.REGISTRY_PASSWORD }}" | \ if echo "${{ secrets.REGISTRY_PASSWORD }}" | \
docker login "${{ secrets.REGISTRY_URL }}" \ docker login "${{ env.REGISTRY }}" \
-u "${{ secrets.REGISTRY_USER }}" \ -u "${{ secrets.REGISTRY_USER }}" \
--password-stdin; then --password-stdin; then
exit 0 exit 0

View file

@ -8,7 +8,7 @@
# This file is based on these images: # This file is based on these images:
# #
# - https://hub.docker.com/r/hexpm/elixir/tags - for the build image # - https://hub.docker.com/r/hexpm/elixir/tags - for the build image
# - git.mcintire.me/graham/prop-base - prebuilt runtime base (see Dockerfile.base) # - codeberg.org/gmcintire/prop-base - prebuilt runtime base (see Dockerfile.base)
# - Ex: docker.io/hexpm/elixir:1.19.5-erlang-28.4.1-debian-trixie-20260316-slim # - Ex: docker.io/hexpm/elixir:1.19.5-erlang-28.4.1-debian-trixie-20260316-slim
# #
ARG ELIXIR_VERSION=1.19.5 ARG ELIXIR_VERSION=1.19.5
@ -21,7 +21,7 @@ ARG BUILDER_IMAGE="docker.io/hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION
# only when Dockerfile.base changes, so this Dockerfile pulls a # only when Dockerfile.base changes, so this Dockerfile pulls a
# ready-made layer instead of recompiling wgrib2 + reinstalling cdo # ready-made layer instead of recompiling wgrib2 + reinstalling cdo
# (~10 min) on every push. # (~10 min) on every push.
ARG BASE_IMAGE="git.mcintire.me/graham/prop-base:latest" ARG BASE_IMAGE="codeberg.org/gmcintire/prop-base:latest"
# ---- Elixir build stage ---- # ---- Elixir build stage ----
FROM ${BUILDER_IMAGE} AS builder FROM ${BUILDER_IMAGE} AS builder