Files
bot-bottle/.gitea/workflows/publish-infra.yml
T
didericis-claude 559dc03bb5
tracker-policy-pr / check-pr (pull_request) Successful in 16s
test / integration-docker (pull_request) Successful in 33s
test / coverage (pull_request) Failing after 34s
test / unit (pull_request) Successful in 37s
test / integration-firecracker (pull_request) Successful in 44s
ci(infra): build images locally in test jobs; publish post-merge
The test jobs were pulling a pre-published infra rootfs artifact from the
registry, which made CI dependent on an out-of-band publish step. Test suites
should be self-contained.

- Set BOT_BOTTLE_INFRA_BUILD=local in integration-firecracker and coverage
  so both jobs build agent and infra images from the checked-out source.
- Add publish-infra.yml: a separate workflow that fires after the test
  workflow succeeds on main, builds the same rootfs, and uploads it to the
  Gitea generic-package registry for operators who want the pull path.
- Registry credentials (BOT_BOTTLE_INFRA_ARTIFACT_TOKEN) are only needed
  by the post-merge publish job, never by test jobs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-19 21:43:39 +00:00

32 lines
1.1 KiB
YAML

# Build and publish the Firecracker infra rootfs artifact after tests pass on main.
#
# The test suite builds images locally (BOT_BOTTLE_INFRA_BUILD=local). This
# workflow is the separate publish step: it runs AFTER the test workflow
# completes on main pushes, builds the same rootfs, and uploads it to the
# Gitea generic-package registry so operators can pull it without Docker.
#
# Auth: BOT_BOTTLE_INFRA_ARTIFACT_TOKEN must be a Gitea token with
# write:package on the target owner (set in repo secrets).
name: publish-infra
on:
workflow_run:
workflows: [test]
types: [completed]
branches: [main]
jobs:
publish:
runs-on: [self-hosted, kvm]
# Only publish when the test workflow succeeded — never on a failing main.
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and publish infra rootfs artifact
env:
BOT_BOTTLE_INFRA_ARTIFACT_TOKEN: ${{ secrets.BOT_BOTTLE_INFRA_ARTIFACT_TOKEN }}
run: python3 -m bot_bottle.backend.firecracker.publish_infra