Files
waffle2k 3694225d64
docker-build-push / build-push (push) Successful in 45s
Migrate CI to Gitea Actions
Adds .gitea/workflows/docker-build-push.yml (build+push to
gitea.blairhaus.net/pmb/finger-web, matching yttrx-welcomebot's pattern
for the same admin.yttrx.com deploy target) now that GitHub is retired.
2026-07-23 22:09:32 -07:00

34 lines
1.1 KiB
YAML

name: docker-build-push
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# act_runner bind-mounts the admin host's real Docker socket into every
# job container (Docker-outside-of-Docker, not a nested daemon), so
# `docker` here talks straight to the host's daemon — no separate
# dockerd to start. Deploy to admin.yttrx.com stays manual (docker
# compose pull && up -d there), matching yttrx-welcomebot's pattern for
# the same host.
- name: Build and push image
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
SHA="${{ github.sha }}"
IMAGE="gitea.blairhaus.net/pmb/finger-web"
docker build -t "$IMAGE:$SHA" -t "$IMAGE:latest" .
printf '%s' "$REGISTRY_TOKEN" | docker login gitea.blairhaus.net -u pmb --password-stdin
docker push "$IMAGE:$SHA"
docker push "$IMAGE:latest"
docker logout gitea.blairhaus.net
echo "pushed $IMAGE:$SHA and $IMAGE:latest"