Compare commits

..

19 Commits

Author SHA1 Message Date
Mathias Beaulieu-Duncan
d99545f9a8 Add Flutter SDK Android and Linux base images with native Wolfi packages
All checks were successful
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 10m2s
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 10m4s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m4s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 10m10s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk-android.yaml, flutter-sdk-android) (push) Successful in 11m52s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk-linux.yaml, flutter-sdk-linux) (push) Successful in 16m54s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 10m19s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Successful in 9m58s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Successful in 10m1s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 9m56s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 10m1s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m0s
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 4s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 2s
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 15s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Successful in 9m58s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 9m58s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 9m58s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Successful in 10m0s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m1s
- Add flutter-sdk-android.yaml with OpenJDK 17 from Wolfi packages
- Add flutter-sdk-linux.yaml with clang-19, cmake, ninja, GTK3 from Wolfi
- Update publish workflow to build new variants

This eliminates the need to copy libraries from Debian, removing all
Debian-sourced CVEs from the derived Flutter SDK images.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 23:49:05 -05:00
4120f820a0 Fix multi-arch builds to preserve OCI config metadata
All checks were successful
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 10m9s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 10m20s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 10m10s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m18s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 10m5s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Successful in 9m56s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Successful in 9m59s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 9m59s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m1s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 10m0s
Extract rootfs layer and config from apko OCI archive separately,
then generate Dockerfile with ENV, ENTRYPOINT, WORKDIR and USER
from the OCI config. Fixes missing environment variables in the
final multi-arch image.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:55:22 -05:00
Mathias Beaulieu-Duncan
81b219fedc Add multi-arch support (amd64 + arm64) for all image variants
All checks were successful
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 9m56s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 10m8s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 10m4s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m9s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 9m59s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Successful in 9m51s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Successful in 9m59s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 9m53s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m1s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 10m1s
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 14s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Successful in 10m0s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Successful in 9m59s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 10m2s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 10m3s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 9m54s
Build per-arch apko tarballs separately, then use buildx with QEMU and
TARGETARCH to produce a proper multi-platform OCI image index. Each
platform gets its correct native rootfs from apko.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:50:27 -05:00
Mathias Beaulieu-Duncan
70fc24a7e6 Fix apko install: assign env to shell var before use in URL
Some checks failed
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 40s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 43s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 49s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 1m5s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 40s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Successful in 40s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Successful in 43s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 37s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 41s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 55s
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 27s
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Has been cancelled
Gitea drops the second ${{ env.APKO_VERSION }} expansion when multiple
expressions appear on the same line. Assigning to a shell variable
first avoids the bug.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:46:09 -05:00
Mathias Beaulieu-Duncan
193ce6f4c6 Upgrade apko from 0.21.0 to 1.1.2
Some checks failed
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 1m1s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 1m3s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 42s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 1m4s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 46s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Successful in 32s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 33s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Successful in 43s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 36s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 38s
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Check for Upstream Stable Updates / Check Wolfi package updates (push) Has been cancelled
Fixes wolfi-baselayout install failure caused by symlink tar entry
handling that changed in newer Wolfi packages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:42:01 -05:00
Mathias Beaulieu-Duncan
6593a17aea Switch provenance back to mode=max for Docker Scout compliance
Some checks failed
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Failing after 33s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Waiting to run
Check for Upstream Stable Updates / Check Wolfi package updates (push) Waiting to run
Check for Upstream Stable Updates / Check .NET stable releases (push) Waiting to run
Check for Upstream Stable Updates / Check Flutter stable releases (push) Waiting to run
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Failing after 44s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 34s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been cancelled
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been cancelled
Attestations are stored as separate manifests in the OCI index, not in
the image layers. Docker pull only fetches the platform manifest, so
mode=max does not affect actual pull size. Docker Scout requires max
mode for full compliance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:40:49 -05:00
Mathias Beaulieu-Duncan
f9890ff15d Pin apko version to avoid GitHub API rate limiting
Some checks failed
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Waiting to run
Check for Upstream Stable Updates / Check Wolfi package updates (push) Waiting to run
Check for Upstream Stable Updates / Check .NET stable releases (push) Waiting to run
Check for Upstream Stable Updates / Check Flutter stable releases (push) Waiting to run
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Failing after 27s
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Failing after 15s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 16s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Failing after 16s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Failing after 22s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Has been cancelled
Dynamic resolution via api.github.com/repos/.../releases/latest hits
the 60 req/hour unauthenticated rate limit when 5 matrix variants run
across multiple pipelines. Pin to v0.21.0 as a top-level env var for
easy updates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:39:48 -05:00
Mathias Beaulieu-Duncan
9e93d02602 Switch provenance from mode=max to mode=min to reduce image size
Some checks failed
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Waiting to run
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Check Wolfi package updates (push) Waiting to run
Check for Upstream Stable Updates / Check .NET stable releases (push) Waiting to run
Check for Upstream Stable Updates / Check Flutter stable releases (push) Waiting to run
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Blocked by required conditions
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 39s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 59s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 51s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Failing after 4s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 52s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Successful in 46s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Successful in 34s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been cancelled
mode=max embeds full build logs and environment as attestation layers,
roughly doubling the reported image size. mode=min still satisfies
provenance compliance with minimal metadata overhead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:36:43 -05:00
Mathias Beaulieu-Duncan
f72130c6bf Add USER 65532 to generated Dockerfile for non-root compliance
Some checks failed
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Waiting to run
Check for Upstream Stable Updates / Check Wolfi package updates (push) Waiting to run
Check for Upstream Stable Updates / Check .NET stable releases (push) Waiting to run
Check for Upstream Stable Updates / Check Flutter stable releases (push) Waiting to run
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 49s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 58s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 51s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 1m8s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 39s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Has been cancelled
The FROM scratch + ADD pattern loses apko's OCI config metadata including
the run-as user. Adding USER 65532 to the Dockerfile restores the
non-root default that Docker Scout checks for.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:34:15 -05:00
Mathias Beaulieu-Duncan
7c2d558a35 Replace cosign with docker buildx for SBOM and provenance attestations
Some checks failed
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Successful in 38s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Successful in 57s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 50s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 1m10s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 40s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Successful in 41s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Successful in 39s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 37s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 37s
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 19s
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 5s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 46s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Successful in 34s
Cosign keyless mode requires OIDC browser auth which is not viable in CI.
Switch all three pipelines to use apko build + docker buildx with
--sbom=true and --provenance=mode=max for automatic attestation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:29:27 -05:00
Mathias Beaulieu-Duncan
510bfa01b9 Fix provenance: pass only predicate to cosign, not full in-toto statement
Some checks failed
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been cancelled
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been cancelled
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been cancelled
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Has been cancelled
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Has been cancelled
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been cancelled
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been cancelled
Check for Upstream Stable Updates / Check Wolfi package updates (push) Has been cancelled
Check for Upstream Stable Updates / Check Flutter stable releases (push) Has been cancelled
cosign attest --type slsaprovenance expects the predicate JSON only
(builder, buildType, invocation, metadata). It wraps it in the
in-toto statement envelope itself. Passing the full statement caused
cosign to look for builder at the wrong nesting level.

Ref: https://github.com/sigstore/cosign/issues/3757

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:21:39 -05:00
Mathias Beaulieu-Duncan
b3372fce38 Add versioned tags with auto-incrementing build number
Some checks failed
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Waiting to run
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Waiting to run
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Check Wolfi package updates (push) Waiting to run
Check for Upstream Stable Updates / Check .NET stable releases (push) Waiting to run
Check for Upstream Stable Updates / Check Flutter stable releases (push) Waiting to run
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Build and Push Base Distro Images / build-and-push (apko/base.yaml, base) (push) Failing after 27s
Build and Push Base Distro Images / build-and-push (apko/build.yaml, build) (push) Failing after 29s
Build and Push Base Distro Images / build-and-push (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 35s
Build and Push Base Distro Images / build-and-push (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Failing after 32s
Build and Push Base Distro Images / build-and-push (apko/flutter-sdk.yaml, flutter-sdk) (push) Failing after 26s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Failing after 25s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been cancelled
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Has been cancelled
Each variant now gets a versioned tag alongside -latest:
- base/build: glibc version (e.g. base-2.42.1, base-2.42.2)
- dotnet-runtime: .NET runtime version (e.g. dotnet-runtime-10.0.0.1)
- dotnet-sdk: .NET SDK version (e.g. dotnet-sdk-10.0.100.1)
- flutter-sdk: Flutter version (e.g. flutter-sdk-3.38.9.1)

The build number auto-increments by querying existing tags on
DockerHub. Also fixes provenance JSON (use jq instead of heredoc)
and adds push-on-self triggers for publish/rebuild pipelines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:19:42 -05:00
Mathias Beaulieu-Duncan
dcedc113e8 Fix provenance JSON: use jq instead of heredoc to avoid whitespace
Some checks failed
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Blocked by required conditions
Check for Upstream Stable Updates / Create release for new Flutter version (push) Blocked by required conditions
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Failing after 24s
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Failing after 24s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Failing after 27s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 28s
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 14s
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Failing after 17s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Failing after 21s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 20s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been cancelled
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been cancelled
The heredoc with YAML indentation produced JSON with leading spaces,
causing cosign to fail with "required field builder missing". Use
jq -n with --arg to generate clean JSON.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:17:16 -05:00
Mathias Beaulieu-Duncan
2e07c31e99 Add SBOM and provenance attestations via cosign
Some checks failed
Weekly Rebuild (CVE Updates) / rebuild (apko/build.yaml, build) (push) Failing after 28s
Weekly Rebuild (CVE Updates) / rebuild (apko/base.yaml, base) (push) Failing after 30s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 26s
Weekly Rebuild (CVE Updates) / rebuild (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Failing after 26s
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 16s
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 2s
Weekly Rebuild (CVE Updates) / rebuild (apko/flutter-sdk.yaml, flutter-sdk) (push) Failing after 27s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Failing after 22s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Failing after 22s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 22s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 2s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Failing after 24s
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Failing after 20s
Use cosign to attach SPDX SBOM (generated by apko) and SLSA
provenance attestations to all published images. Applied to
publish, rebuild, and update-check pipelines.

Also added push trigger on self-path for rebuild.yaml.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:12:47 -05:00
Mathias Beaulieu-Duncan
0711e3142a Fix apko install in rebuild job of update-check pipeline
All checks were successful
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 2s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 2s
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 15s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Successful in 25s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Successful in 35s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Successful in 36s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Successful in 38s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Successful in 31s
The second Install apko step (in the rebuild job) was missed in the
previous fixes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:03:35 -05:00
Mathias Beaulieu-Duncan
d6cac3cc8b Fix apko tar extraction: binary is in a subdirectory
Some checks failed
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 2s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 2s
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Check for Upstream Stable Updates / Check Wolfi package updates (push) Successful in 15s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Failing after 3s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Failing after 3s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Failing after 3s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Failing after 3s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Failing after 3s
The tarball contains apko_1.1.2_linux_amd64/apko, not a flat apko
binary. Use --strip-components=1 to extract correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:02:18 -05:00
Mathias Beaulieu-Duncan
b2bf4e309a Fix apko asset filename: include version number
Some checks failed
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Wolfi package updates (push) Failing after 3s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 2s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been skipped
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Asset naming is apko_1.1.2_linux_amd64.tar.gz, not
apko_linux_amd64.tar.gz. Strip the v prefix from the tag
to build the correct filename.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:01:06 -05:00
Mathias Beaulieu-Duncan
855564ecfd Add debug output to apko install step
Some checks failed
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Wolfi package updates (push) Failing after 3s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been skipped
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:59:59 -05:00
Mathias Beaulieu-Duncan
3bd65d9e05 Fix apko install: resolve version via GitHub API instead of /latest redirect
Some checks failed
Check for Upstream Stable Updates / Check .NET stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Check Wolfi package updates (push) Failing after 2s
Check for Upstream Stable Updates / Check Flutter stable releases (push) Successful in 1s
Check for Upstream Stable Updates / Rebuild and push all variants (apko/base.yaml, base) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/build.yaml, build) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-runtime.yaml, dotnet-runtime) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/dotnet-sdk.yaml, dotnet-sdk) (push) Has been skipped
Check for Upstream Stable Updates / Rebuild and push all variants (apko/flutter-sdk.yaml, flutter-sdk) (push) Has been skipped
Check for Upstream Stable Updates / Create release for new Flutter version (push) Has been skipped
The Gitea runner doesn't follow GitHub's /latest/download/ 302
redirect properly. Resolve the version tag explicitly via the
GitHub API, then download from the versioned URL directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 09:58:52 -05:00
6 changed files with 458 additions and 19 deletions

View File

@ -3,13 +3,16 @@ name: Build and Push Base Distro Images
on:
release:
types: [published, prereleased]
workflow_dispatch:
push:
paths:
- '.gitea/workflows/publish.yaml'
permissions:
contents: read
env:
IMAGE_NAME: base-distro
APKO_VERSION: 1.1.2
jobs:
build-and-push:
@ -27,11 +30,15 @@ jobs:
variant: dotnet-sdk
- config: apko/flutter-sdk.yaml
variant: flutter-sdk
- config: apko/flutter-sdk-android.yaml
variant: flutter-sdk-android
- config: apko/flutter-sdk-linux.yaml
variant: flutter-sdk-linux
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Determine tag
- name: Determine tag type
id: tag
run: |
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
@ -42,9 +49,18 @@ jobs:
- name: Install apko
run: |
APKO_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
APKO_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL "https://github.com/chainguard-dev/apko/releases/latest/download/apko_${APKO_OS}_${APKO_ARCH}.tar.gz" | tar xz -C /usr/local/bin apko
APKO_VER="${{ env.APKO_VERSION }}"
curl -fsSL "https://github.com/chainguard-dev/apko/releases/download/v${APKO_VER}/apko_${APKO_VER}_linux_${APKO_ARCH}.tar.gz" \
-o /tmp/apko.tar.gz
tar xzf /tmp/apko.tar.gz --strip-components=1 -C /usr/local/bin
rm /tmp/apko.tar.gz
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
@ -52,10 +68,116 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push image
- name: Determine upstream version
id: version
run: |
apko publish ${{ matrix.config }} \
VARIANT="${{ matrix.variant }}"
case "$VARIANT" in
base|build)
UPSTREAM=$(apko resolve ${{ matrix.config }} 2>&1 | grep -oP 'glibc-\K[0-9]+\.[0-9]+' | head -1 || echo "0.0")
if [ "$UPSTREAM" = "" ] || [ "$UPSTREAM" = "0.0" ]; then
UPSTREAM=$(apko resolve ${{ matrix.config }} 2>&1 | grep -oP 'glibc \(\K[0-9]+\.[0-9]+' | head -1 || echo "2.42")
fi
;;
dotnet-runtime)
UPSTREAM=$(curl -fsSL "https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json" \
| jq -r '[."releases-index"[] | select(."support-phase" == "active" or ."support-phase" == "go-live") | ."latest-runtime"] | sort_by(. | split(".") | map(tonumber)) | last')
;;
dotnet-sdk)
UPSTREAM=$(curl -fsSL "https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json" \
| jq -r '[."releases-index"[] | select(."support-phase" == "active" or ."support-phase" == "go-live") | ."latest-sdk"] | sort_by(. | split(".") | map(tonumber)) | last')
;;
flutter-sdk|flutter-sdk-android|flutter-sdk-linux)
UPSTREAM=$(curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json" \
| jq -r '.current_release.stable as $hash | .releases[] | select(.hash == $hash and .channel == "stable") | .version')
;;
esac
echo "upstream=${UPSTREAM}" >> "$GITHUB_OUTPUT"
echo "Upstream version for ${VARIANT}: ${UPSTREAM}"
REPO_NAME="${{ env.IMAGE_NAME }}"
REGISTRY_URL="${{ secrets.REGISTRY_URL }}"
NAMESPACE=$(echo "$REGISTRY_URL" | sed 's|.*://||; s|.*\.io/||; s|/$||')
EXISTING_TAGS=$(curl -s "https://hub.docker.com/v2/repositories/${NAMESPACE}/${REPO_NAME}/tags?page_size=100&name=${VARIANT}-${UPSTREAM}." \
| jq -r '.results[]?.name // empty' 2>/dev/null || echo "")
MAX_BUILD=0
for tag in $EXISTING_TAGS; do
BUILD_NUM=$(echo "$tag" | grep -oP "\.\K[0-9]+$" || echo "0")
if [ "$BUILD_NUM" -gt "$MAX_BUILD" ] 2>/dev/null; then
MAX_BUILD=$BUILD_NUM
fi
done
NEXT_BUILD=$((MAX_BUILD + 1))
VERSION_TAG="${VARIANT}-${UPSTREAM}.${NEXT_BUILD}"
echo "version_tag=${VERSION_TAG}" >> "$GITHUB_OUTPUT"
echo "Next version tag: ${VERSION_TAG}"
- name: Build per-arch apko tarballs
run: |
mkdir -p /tmp/build-amd64 /tmp/build-arm64
apko build --arch x86_64 ${{ matrix.config }} \
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-${{ steps.tag.outputs.suffix }} \
/tmp/build-amd64/image.tar
apko build --arch aarch64 ${{ matrix.config }} \
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-${{ steps.tag.outputs.suffix }} \
/tmp/build-arm64/image.tar
# Extract the rootfs layer from the OCI archive for each arch.
# apko outputs an OCI image tarball; we need to extract just the
# filesystem layer (.tar.gz) and the config metadata.
for arch in amd64 arm64; do
cd /tmp/build-${arch}
tar xf image.tar
# The .tar.gz file is the filesystem layer
ROOTFS=$(ls *.tar.gz 2>/dev/null | head -1)
mv "$ROOTFS" rootfs.tar.gz
# Extract ENV and ENTRYPOINT from the OCI config
MANIFEST_DIGEST=$(jq -r '.manifests[0].digest' index.json | sed 's/sha256://')
CONFIG_DIGEST=$(jq -r '.config.digest' "sha256:${MANIFEST_DIGEST}" | sed 's/sha256://')
cp "sha256:${CONFIG_DIGEST}" config.json
# Clean up OCI artifacts
rm -f image.tar index.json manifest.json oci-layout sha256:*
cd /tmp
done
# Generate Dockerfile with metadata from the OCI config
# (use amd64 config as reference — env vars are the same for both arches)
ENV_LINES=$(jq -r '(.config.Env // [])[] | "ENV " + .' /tmp/build-amd64/config.json)
ENTRYPOINT=$(jq -r '(.config.Entrypoint // [])[]' /tmp/build-amd64/config.json | head -1)
USER_ID=$(jq -r '.config.User // "65532"' /tmp/build-amd64/config.json)
WORKDIR=$(jq -r '.config.WorkingDir // "/"' /tmp/build-amd64/config.json)
{
echo "FROM scratch"
echo "ARG TARGETARCH"
echo "ADD build-\${TARGETARCH}/rootfs.tar.gz /"
if [ -n "$ENV_LINES" ]; then
echo "$ENV_LINES"
fi
if [ -n "$ENTRYPOINT" ] && [ "$ENTRYPOINT" != "null" ]; then
echo "ENTRYPOINT [\"${ENTRYPOINT}\"]"
fi
echo "WORKDIR ${WORKDIR}"
echo "USER ${USER_ID}"
} > /tmp/Dockerfile
- name: Build and push with buildx (SBOM + provenance)
uses: docker/build-push-action@v5
with:
context: /tmp
file: /tmp/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
sbom: true
provenance: mode=max
tags: |
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-${{ steps.tag.outputs.suffix }}
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version_tag }}
- name: Install Docker Scout
run: |

View File

@ -4,13 +4,16 @@ on:
schedule:
# Rebuild weekly to pick up Wolfi security patches
- cron: '0 6 * * 1'
workflow_dispatch:
push:
paths:
- '.gitea/workflows/rebuild.yaml'
permissions:
contents: read
env:
IMAGE_NAME: base-distro
APKO_VERSION: 1.1.2
jobs:
rebuild:
@ -34,9 +37,18 @@ jobs:
- name: Install apko
run: |
APKO_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
APKO_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL "https://github.com/chainguard-dev/apko/releases/latest/download/apko_${APKO_OS}_${APKO_ARCH}.tar.gz" | tar xz -C /usr/local/bin apko
APKO_VER="${{ env.APKO_VERSION }}"
curl -fsSL "https://github.com/chainguard-dev/apko/releases/download/v${APKO_VER}/apko_${APKO_VER}_linux_${APKO_ARCH}.tar.gz" \
-o /tmp/apko.tar.gz
tar xzf /tmp/apko.tar.gz --strip-components=1 -C /usr/local/bin
rm /tmp/apko.tar.gz
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
@ -44,10 +56,116 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Rebuild and push with latest Wolfi packages
- name: Determine upstream version
id: version
run: |
apko publish ${{ matrix.config }} \
VARIANT="${{ matrix.variant }}"
case "$VARIANT" in
base|build)
UPSTREAM=$(apko resolve ${{ matrix.config }} 2>&1 | grep -oP 'glibc-\K[0-9]+\.[0-9]+' | head -1 || echo "0.0")
if [ "$UPSTREAM" = "" ] || [ "$UPSTREAM" = "0.0" ]; then
UPSTREAM=$(apko resolve ${{ matrix.config }} 2>&1 | grep -oP 'glibc \(\K[0-9]+\.[0-9]+' | head -1 || echo "2.42")
fi
;;
dotnet-runtime)
UPSTREAM=$(curl -fsSL "https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json" \
| jq -r '[."releases-index"[] | select(."support-phase" == "active" or ."support-phase" == "go-live") | ."latest-runtime"] | sort_by(. | split(".") | map(tonumber)) | last')
;;
dotnet-sdk)
UPSTREAM=$(curl -fsSL "https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json" \
| jq -r '[."releases-index"[] | select(."support-phase" == "active" or ."support-phase" == "go-live") | ."latest-sdk"] | sort_by(. | split(".") | map(tonumber)) | last')
;;
flutter-sdk)
UPSTREAM=$(curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json" \
| jq -r '.current_release.stable as $hash | .releases[] | select(.hash == $hash and .channel == "stable") | .version')
;;
esac
echo "upstream=${UPSTREAM}" >> "$GITHUB_OUTPUT"
echo "Upstream version for ${VARIANT}: ${UPSTREAM}"
REPO_NAME="${{ env.IMAGE_NAME }}"
REGISTRY_URL="${{ secrets.REGISTRY_URL }}"
NAMESPACE=$(echo "$REGISTRY_URL" | sed 's|.*://||; s|.*\.io/||; s|/$||')
EXISTING_TAGS=$(curl -s "https://hub.docker.com/v2/repositories/${NAMESPACE}/${REPO_NAME}/tags?page_size=100&name=${VARIANT}-${UPSTREAM}." \
| jq -r '.results[]?.name // empty' 2>/dev/null || echo "")
MAX_BUILD=0
for tag in $EXISTING_TAGS; do
BUILD_NUM=$(echo "$tag" | grep -oP "\.\K[0-9]+$" || echo "0")
if [ "$BUILD_NUM" -gt "$MAX_BUILD" ] 2>/dev/null; then
MAX_BUILD=$BUILD_NUM
fi
done
NEXT_BUILD=$((MAX_BUILD + 1))
VERSION_TAG="${VARIANT}-${UPSTREAM}.${NEXT_BUILD}"
echo "version_tag=${VERSION_TAG}" >> "$GITHUB_OUTPUT"
echo "Next version tag: ${VERSION_TAG}"
- name: Build per-arch apko tarballs
run: |
mkdir -p /tmp/build-amd64 /tmp/build-arm64
apko build --arch x86_64 ${{ matrix.config }} \
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest \
/tmp/build-amd64/image.tar
apko build --arch aarch64 ${{ matrix.config }} \
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest \
/tmp/build-arm64/image.tar
# Extract the rootfs layer from the OCI archive for each arch.
# apko outputs an OCI image tarball; we need to extract just the
# filesystem layer (.tar.gz) and the config metadata.
for arch in amd64 arm64; do
cd /tmp/build-${arch}
tar xf image.tar
# The .tar.gz file is the filesystem layer
ROOTFS=$(ls *.tar.gz 2>/dev/null | head -1)
mv "$ROOTFS" rootfs.tar.gz
# Extract ENV and ENTRYPOINT from the OCI config
MANIFEST_DIGEST=$(jq -r '.manifests[0].digest' index.json | sed 's/sha256://')
CONFIG_DIGEST=$(jq -r '.config.digest' "sha256:${MANIFEST_DIGEST}" | sed 's/sha256://')
cp "sha256:${CONFIG_DIGEST}" config.json
# Clean up OCI artifacts
rm -f image.tar index.json manifest.json oci-layout sha256:*
cd /tmp
done
# Generate Dockerfile with metadata from the OCI config
# (use amd64 config as reference — env vars are the same for both arches)
ENV_LINES=$(jq -r '(.config.Env // [])[] | "ENV " + .' /tmp/build-amd64/config.json)
ENTRYPOINT=$(jq -r '(.config.Entrypoint // [])[]' /tmp/build-amd64/config.json | head -1)
USER_ID=$(jq -r '.config.User // "65532"' /tmp/build-amd64/config.json)
WORKDIR=$(jq -r '.config.WorkingDir // "/"' /tmp/build-amd64/config.json)
{
echo "FROM scratch"
echo "ARG TARGETARCH"
echo "ADD build-\${TARGETARCH}/rootfs.tar.gz /"
if [ -n "$ENV_LINES" ]; then
echo "$ENV_LINES"
fi
if [ -n "$ENTRYPOINT" ] && [ "$ENTRYPOINT" != "null" ]; then
echo "ENTRYPOINT [\"${ENTRYPOINT}\"]"
fi
echo "WORKDIR ${WORKDIR}"
echo "USER ${USER_ID}"
} > /tmp/Dockerfile
- name: Build and push with buildx (SBOM + provenance)
uses: docker/build-push-action@v5
with:
context: /tmp
file: /tmp/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
sbom: true
provenance: mode=max
tags: |
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version_tag }}
- name: Install Docker Scout
run: |

View File

@ -10,6 +10,7 @@ permissions:
env:
IMAGE_NAME: base-distro
APKO_VERSION: 1.1.2
jobs:
scout:
@ -52,9 +53,12 @@ jobs:
- name: Install apko
if: steps.should_run.outputs.run == 'true'
run: |
APKO_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
APKO_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL "https://github.com/chainguard-dev/apko/releases/latest/download/apko_${APKO_OS}_${APKO_ARCH}.tar.gz" | tar xz -C /usr/local/bin apko
APKO_VER="${{ env.APKO_VERSION }}"
curl -fsSL "https://github.com/chainguard-dev/apko/releases/download/v${APKO_VER}/apko_${APKO_VER}_linux_${APKO_ARCH}.tar.gz" \
-o /tmp/apko.tar.gz
tar xzf /tmp/apko.tar.gz --strip-components=1 -C /usr/local/bin
rm /tmp/apko.tar.gz
- name: Build image locally
if: steps.should_run.outputs.run == 'true'

View File

@ -13,6 +13,7 @@ permissions:
env:
IMAGE_NAME: base-distro
APKO_VERSION: 1.1.2
jobs:
check-wolfi:
@ -26,9 +27,12 @@ jobs:
- name: Install apko
run: |
APKO_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
APKO_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL "https://github.com/chainguard-dev/apko/releases/latest/download/apko_${APKO_OS}_${APKO_ARCH}.tar.gz" | tar xz -C /usr/local/bin apko
APKO_VER="${{ env.APKO_VERSION }}"
curl -fsSL "https://github.com/chainguard-dev/apko/releases/download/v${APKO_VER}/apko_${APKO_VER}_linux_${APKO_ARCH}.tar.gz" \
-o /tmp/apko.tar.gz
tar xzf /tmp/apko.tar.gz --strip-components=1 -C /usr/local/bin
rm /tmp/apko.tar.gz
- name: Check for Wolfi package updates
id: check
@ -122,9 +126,18 @@ jobs:
- name: Install apko
run: |
APKO_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
APKO_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL "https://github.com/chainguard-dev/apko/releases/latest/download/apko_${APKO_OS}_${APKO_ARCH}.tar.gz" | tar xz -C /usr/local/bin apko
APKO_VER="${{ env.APKO_VERSION }}"
curl -fsSL "https://github.com/chainguard-dev/apko/releases/download/v${APKO_VER}/apko_${APKO_VER}_linux_${APKO_ARCH}.tar.gz" \
-o /tmp/apko.tar.gz
tar xzf /tmp/apko.tar.gz --strip-components=1 -C /usr/local/bin
rm /tmp/apko.tar.gz
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
@ -132,10 +145,84 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push image
- name: Determine upstream version
id: version
run: |
apko publish ${{ matrix.config }} \
VARIANT="${{ matrix.variant }}"
case "$VARIANT" in
base|build)
UPSTREAM=$(apko resolve ${{ matrix.config }} 2>&1 | grep -oP 'glibc-\K[0-9]+\.[0-9]+' | head -1 || echo "0.0")
if [ "$UPSTREAM" = "" ] || [ "$UPSTREAM" = "0.0" ]; then
UPSTREAM=$(apko resolve ${{ matrix.config }} 2>&1 | grep -oP 'glibc \(\K[0-9]+\.[0-9]+' | head -1 || echo "2.42")
fi
;;
dotnet-runtime)
UPSTREAM=$(curl -fsSL "https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json" \
| jq -r '[."releases-index"[] | select(."support-phase" == "active" or ."support-phase" == "go-live") | ."latest-runtime"] | sort_by(. | split(".") | map(tonumber)) | last')
;;
dotnet-sdk)
UPSTREAM=$(curl -fsSL "https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json" \
| jq -r '[."releases-index"[] | select(."support-phase" == "active" or ."support-phase" == "go-live") | ."latest-sdk"] | sort_by(. | split(".") | map(tonumber)) | last')
;;
flutter-sdk)
UPSTREAM=$(curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json" \
| jq -r '.current_release.stable as $hash | .releases[] | select(.hash == $hash and .channel == "stable") | .version')
;;
esac
echo "upstream=${UPSTREAM}" >> "$GITHUB_OUTPUT"
echo "Upstream version for ${VARIANT}: ${UPSTREAM}"
REPO_NAME="${{ env.IMAGE_NAME }}"
REGISTRY_URL="${{ secrets.REGISTRY_URL }}"
NAMESPACE=$(echo "$REGISTRY_URL" | sed 's|.*://||; s|.*\.io/||; s|/$||')
EXISTING_TAGS=$(curl -s "https://hub.docker.com/v2/repositories/${NAMESPACE}/${REPO_NAME}/tags?page_size=100&name=${VARIANT}-${UPSTREAM}." \
| jq -r '.results[]?.name // empty' 2>/dev/null || echo "")
MAX_BUILD=0
for tag in $EXISTING_TAGS; do
BUILD_NUM=$(echo "$tag" | grep -oP "\.\K[0-9]+$" || echo "0")
if [ "$BUILD_NUM" -gt "$MAX_BUILD" ] 2>/dev/null; then
MAX_BUILD=$BUILD_NUM
fi
done
NEXT_BUILD=$((MAX_BUILD + 1))
VERSION_TAG="${VARIANT}-${UPSTREAM}.${NEXT_BUILD}"
echo "version_tag=${VERSION_TAG}" >> "$GITHUB_OUTPUT"
echo "Next version tag: ${VERSION_TAG}"
- name: Build per-arch apko tarballs
run: |
mkdir -p /tmp/build-amd64 /tmp/build-arm64
apko build --arch x86_64 ${{ matrix.config }} \
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest \
/tmp/build-amd64/image.tar
apko build --arch aarch64 ${{ matrix.config }} \
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest \
/tmp/build-arm64/image.tar
cat > /tmp/Dockerfile <<'EOF'
FROM scratch
ARG TARGETARCH
ADD build-${TARGETARCH}/image.tar /
USER 65532
EOF
sed -i 's/^ //' /tmp/Dockerfile
- name: Build and push with buildx (SBOM + provenance)
uses: docker/build-push-action@v5
with:
context: /tmp
file: /tmp/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
sbom: true
provenance: mode=max
tags: |
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-latest
${{ secrets.REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version_tag }}
- name: Install Docker Scout
run: |

View File

@ -0,0 +1,49 @@
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://packages.wolfi.dev/os
packages:
# Base runtime
- wolfi-baselayout
- glibc
- glibc-locale-posix
- libstdc++
- ca-certificates-bundle
- tzdata
# Build tools
- bash
- busybox
- coreutils
- git
- curl
- wget
- unzip
- xz
- zip
# Java (for Android SDK)
- openjdk-17
- openjdk-17-default-jvm
accounts:
groups:
- groupname: flutter
gid: 65532
users:
- username: flutter
uid: 65532
gid: 65532
run-as: 65532
archs:
- x86_64
- aarch64
environment:
TZ: UTC
FLUTTER_HOME: /opt/flutter
JAVA_HOME: /usr/lib/jvm/java-17-openjdk
PATH: /opt/flutter/bin:/opt/flutter/bin/cache/dart-sdk/bin:/usr/lib/jvm/java-17-openjdk/bin:/usr/bin:/bin:/usr/sbin:/sbin
entrypoint:
command: /bin/bash

View File

@ -0,0 +1,59 @@
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://packages.wolfi.dev/os
packages:
# Base runtime
- wolfi-baselayout
- glibc
- glibc-locale-posix
- libstdc++
- ca-certificates-bundle
- tzdata
# Build tools
- bash
- busybox
- coreutils
- git
- curl
- wget
- unzip
- xz
# Linux desktop build toolchain
- clang-19
- cmake
- ninja-build
- pkgconf
# GTK and dependencies for Flutter Linux
- gtk-3-dev
- glib-dev
- pango-dev
- harfbuzz-dev
- cairo-dev
- gdk-pixbuf-dev
- xz-dev
accounts:
groups:
- groupname: flutter
gid: 65532
users:
- username: flutter
uid: 65532
gid: 65532
run-as: 65532
archs:
- x86_64
- aarch64
environment:
TZ: UTC
FLUTTER_HOME: /opt/flutter
CC: clang
CXX: clang++
PATH: /opt/flutter/bin:/opt/flutter/bin/cache/dart-sdk/bin:/usr/bin:/bin:/usr/sbin:/sbin
entrypoint:
command: /bin/bash