Files
forgerunner/.gitea/workflows/docker-push.yml
T
Jason Stedwell 9ac794cfca
CI Smoke / toolchain (push) Successful in 2s
Add Phase 3 docker push validation workflow (host runner)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 22:12:09 -05:00

36 lines
1.2 KiB
YAML

name: Docker Push Validation
# Phase 3 validation: docker/login-action + docker build + docker push.
# Runs on the `host` label so it uses the runner's bundled Docker CLI and the
# mounted /var/run/docker.sock. Pushes a small throwaway image to a -citest path.
#
# Requires repo Action secrets REGISTRY_USER / REGISTRY_TOKEN.
on:
workflow_dispatch:
jobs:
build-push:
runs-on: host
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: registry.alwisp.com
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push a test image
run: |
IMAGE="registry.alwisp.com/jason/forgerunner-citest"
TAG="${{ gitea.sha }}"
# Minimal image built from a cached base — validates build + push only.
printf 'FROM ubuntu:22.04\nRUN echo "forgerunner CI push OK at build time"\n' > Dockerfile.citest
docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:latest" -f Dockerfile.citest .
docker push "${IMAGE}:${TAG}"
docker push "${IMAGE}:latest"
echo "Pushed ${IMAGE}:${TAG}"