Add manual Forgejo action to promote :latest → :prod
All checks were successful
Build and Push Docker Image / build-and-push-image (push) Successful in 1m14s

This commit is contained in:
Christoph Haas 2026-05-28 00:33:26 +02:00
parent cf29664f0a
commit c7e8109bbd

View file

@ -0,0 +1,41 @@
# =============================================================================
# Forgejo Actions workflow to promote the "latest" image to "prod"
# =============================================================================
# Triggered manually via the Forgejo UI ("Run workflow" button).
# Pulls the current :latest image and re-tags it as :prod.
# -----------------------------------------------------------------------------
name: Promote :latest → :prod
on:
workflow_dispatch:
jobs:
promote:
runs-on: docker
permissions:
contents: read
packages: write
steps:
- name: Install Docker CLI
run: |
apt-get update -qq
apt-get install -y --no-install-recommends docker.io
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: git.workaround.org
username: ${{ github.actor }}
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Tag :latest → :prod
run: |
IMG="git.workaround.org/${{ github.repository }}"
docker buildx imagetools create \
--tag "${IMG}:prod" \
"${IMG}:latest"