Skip to content

fix(ci): align release.yml feature flags with ci.yml (skip io_uring) #20

fix(ci): align release.yml feature flags with ci.yml (skip io_uring)

fix(ci): align release.yml feature flags with ci.yml (skip io_uring) #20

name: Publish edge image to Docker Hub
on:
# Fire on every push to main — the image build is buildx-cached, so
# commits that don't touch crates/** finish in 2-3 minutes (layers
# cache-hit, manifest re-tags). Eliminates the trigger-race with
# deploy-hetzner.yml: deploy now chains exclusively off this workflow's
# completion via `workflow_run`, so this workflow's success is the
# single deploy gate.
push:
branches: [main]
workflow_dispatch:
# Default-deny GITHUB_TOKEN. Docker Hub auth is via DOCKERHUB_TOKEN;
# nothing on GitHub is mutated by this job.
permissions:
contents: read
concurrency:
# One image build at a time per branch — avoid two concurrent pushes
# racing on the `:edge` tag.
group: publish-edge-${{ github.ref }}
cancel-in-progress: false
jobs:
build-and-push:
runs-on: ubuntu-latest
# Bumped 30→45 after PR #17 — that build hit 30:20 on first run.
# Successful runs land in 22-25 min; the 45-min ceiling absorbs
# cache misses and multi-arch buildx slowdown without retries.
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU (for arm64 emulation)
uses: docker/setup-qemu-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile.beava
push: true
# Multi-arch manifest so Apple Silicon (Docker Desktop default
# platform = linux/arm64) doesn't fall back to slow QEMU
# emulation when running the chapter-1 tutorial. Also covers
# production amd64 servers.
platforms: linux/amd64,linux/arm64
# `:edge` always tracks the latest main commit; `:sha-<sha>`
# gives an immutable handle for rollback / pinning.
tags: |
beavadev/beava:edge
beavadev/beava:sha-${{ github.sha }}
# Buildx layer cache speeds up subsequent runs.
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Job summary
run: |
cat >> "$GITHUB_STEP_SUMMARY" <<EOF
## Docker Hub image published
- \`beavadev/beava:edge\` (rolling)
- \`beavadev/beava:sha-${{ github.sha }}\` (immutable)
- Pull: \`docker pull beavadev/beava:edge\`
- Run: \`docker run -p 8080:8080 beavadev/beava:edge\`
EOF