mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
Upstream MinIO image pulls are blocking CI (#7867). Add a separate publisher for `ghcr.io/block/buzz-minio:latest`, so the reusable image can be bootstrapped before CI adopts it in #7870. - Build the checksummed official MinIO/mc release binaries from #7868 on a digest-pinned Alpine base. - Build only when image/workflow/Compose inputs change or on manual dispatch. PRs build and smoke-test; only `block/buzz` main can publish. - Run the real Compose healthcheck and initializer, object upload/read/delete, and anonymous-access denial before publishing `latest` plus a unique `sha-<commit>-run-<id>-<attempt>` tag. - Manual dispatch disables Docker's layer cache to refresh Alpine packages. Normal image builds retain caching; each maintenance rebuild keeps its own tag. ### Rollout This PR contains only the publisher and opt-in Compose override. **It does not switch ordinary CI consumers**, so its checks do not require the unpublished image. This is a separate PR from adoption, as required by Buzz's squash-only merge rules. 1. Merge this PR; its main-branch workflow builds, tests, and publishes the image. 2. Make the `buzz-minio` GHCR package public and verify an anonymous pull of `ghcr.io/block/buzz-minio:latest`. New GHCR packages default to private. 3. Rebase draft #7870 onto current main, retarget it to main, run its integration checks, and merge it to switch all MinIO-backed CI jobs to the published image. ### Validation - Updated hosted [MinIO image build and smoke test](https://github.com/block/buzz/actions/runs/36018177877) passed at `700ab6d5346b37a64c9defde0016dc65c98aa790`; publication correctly skipped on the PR. - Hosted [ordinary CI](https://github.com/block/buzz/actions/runs/36018178123) passed at the same head. Its actual Git comparison detected only the five publisher files, all application path filters were false, and the MinIO-dependent integration checks were correctly skipped. Synced current main before this run to eliminate an earlier stale-base comparison that included unrelated ACP changes. - Actual five changed paths were passed through the repo's pinned `dorny/paths-filter`: all application domains were false. All 12 existing path-selection cases and the required-context isolation contract also passed. - Publisher actionlint, smoke-script shellcheck, and commit/push hooks passed. - Fresh local rebuild of `700ab6d5346b37a64c9defde0016dc65c98aa790` passed with `docker buildx build --no-cache --platform linux/amd64 --load`. Logs confirm new Alpine index fetches and package installation rather than a cached install layer. The committed smoke script passed under local AMD64 emulation using the current merged Compose services with isolated resource names and no published ports: healthcheck, initializer/private bucket, object upload/read/delete, and anonymous HTTP 403. Temporary containers, network, and volume were removed. Both pinned binary checksums match the official release SHA-256 files. - Full `just ci` was previously attempted: workspace formatting/Clippy, desktop checks, and Tauri formatting passed; the run was stopped during Tauri Clippy. No full local application-suite pass is claimed; hosted application suites correctly skip this publisher-only change. --------- Signed-off-by: Tyler Longwell <tlongwell@squareup.com>
81 lines
3.0 KiB
YAML
81 lines
3.0 KiB
YAML
name: MinIO image
|
|
|
|
# A separate publisher, never a dependency of ordinary CI. Image changes get
|
|
# a build/smoke test on PRs; only reviewed main commits can move :latest.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '.github/ci/minio/**'
|
|
- '.github/workflows/minio-image.yml'
|
|
- 'docker-compose.yml'
|
|
- 'docker-compose.ci.yml'
|
|
pull_request:
|
|
paths:
|
|
- '.github/ci/minio/**'
|
|
- '.github/workflows/minio-image.yml'
|
|
- 'docker-compose.yml'
|
|
- 'docker-compose.ci.yml'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: minio-image-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
IMAGE_NAME: ghcr.io/block/buzz-minio
|
|
COMPOSE_FILE: docker-compose.yml:docker-compose.ci.yml
|
|
MINIO_CI_IMAGE: ghcr.io/block/buzz-minio:sha-${{ github.sha }}-run-${{ github.run_id }}-${{ github.run_attempt }}
|
|
|
|
jobs:
|
|
image:
|
|
name: Build and smoke-test MinIO
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
|
- name: Build image
|
|
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
|
|
with:
|
|
context: .github/ci/minio
|
|
platforms: linux/amd64
|
|
load: true
|
|
tags: ${{ env.MINIO_CI_IMAGE }}
|
|
labels: org.opencontainers.image.revision=${{ github.sha }}
|
|
# A maintenance dispatch must refresh apk packages even with a warm
|
|
# layer cache. Normal image changes can still reuse cached layers.
|
|
no-cache: ${{ github.event_name == 'workflow_dispatch' }}
|
|
cache-from: type=gha,scope=minio
|
|
cache-to: type=gha,scope=minio,mode=max
|
|
- name: Smoke-test CI services
|
|
run: bash .github/ci/minio/smoke-test.sh
|
|
- name: Clean up smoke test
|
|
if: always()
|
|
run: docker compose down --volumes
|
|
- name: Log in to GHCR
|
|
if: github.repository == 'block/buzz' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
|
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Publish tested image
|
|
if: github.repository == 'block/buzz' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
|
run: |
|
|
docker push "$MINIO_CI_IMAGE"
|
|
docker tag "$MINIO_CI_IMAGE" "$IMAGE_NAME:latest"
|
|
docker push "$IMAGE_NAME:latest"
|
|
{
|
|
echo "Published $MINIO_CI_IMAGE and $IMAGE_NAME:latest"
|
|
echo 'First publication: make the buzz-minio package public before enabling CI consumers.'
|
|
} >> "$GITHUB_STEP_SUMMARY"
|