12e6135042
CI Smoke / toolchain (push) Successful in 1s
- publish-image.sh: add REGISTRY_NAMESPACE for Gitea Container Registry path - sample workflows: run docker login/build/push on host label (bundled docker CLI + mounted socket); fix doubled image path in build/push sample - docs: record v0.1.0 publish and remaining secret-gated push validation Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: Smoke — Docker Build and Push
|
|
|
|
# Runs on the `host` label so docker build/push use the runner container's
|
|
# bundled Docker CLI and the mounted /var/run/docker.sock. The `ubuntu-latest`
|
|
# label runs steps inside a node job container that has neither.
|
|
#
|
|
# Requires repo Action secrets:
|
|
# REGISTRY_USER — registry username (e.g. your Gitea user)
|
|
# REGISTRY_TOKEN — a scoped package read/write token (NOT an admin API token)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
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
|
|
run: |
|
|
# gitea.repository is already "owner/repo" (e.g. jason/forgerunner)
|
|
IMAGE="registry.alwisp.com/${{ gitea.repository }}"
|
|
docker build \
|
|
-t "${IMAGE}:latest" \
|
|
-t "${IMAGE}:${{ gitea.sha }}" \
|
|
-f docker/runner/Dockerfile \
|
|
.
|
|
docker push "${IMAGE}:latest"
|
|
docker push "${IMAGE}:${{ gitea.sha }}"
|