forgejo-actions-probe/.forgejo/workflows/image-build.yaml
forgejo_admin 7ce1d4c965
Some checks failed
/ container-probe (push) Successful in 28s
Image Build Probe / image-build (push) Failing after 56s
/ probe (push) Successful in 0s
Add image-build workflow for T04 CI proof
2026-07-03 22:32:55 +00:00

37 lines
958 B
YAML

name: Image Build Probe
on:
push:
paths:
- ".forgejo/workflows/image-build.yaml"
- "Dockerfile"
workflow_dispatch:
env:
REGISTRY: forgejo.coulomb.social
IMAGE_NAME: coulomb/forgejo-actions-probe
jobs:
image-build:
runs-on: container-build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Forgejo registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
run: |
set -eu
TAG="${GITHUB_SHA:-manual}"
SHORT="${TAG:0:7}"
IMAGE="${REGISTRY}/${IMAGE_NAME}"
docker build -t "${IMAGE}:latest" -t "${IMAGE}:${SHORT}" .
docker push "${IMAGE}:latest"
docker push "${IMAGE}:${SHORT}"
echo "pushed ${IMAGE}:latest and ${IMAGE}:${SHORT}"