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. - name: Build and push image env: REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} run: | SHA="${{ github.sha }}" IMAGE="gitea.blairhaus.net/pmb/yttrx-welcomebot" 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"