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.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user