From 12cdafcd134ecf6b77caca87e8da8c15caf520ae Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Thu, 6 Aug 2026 23:35:14 -0500 Subject: [PATCH] receipt: cf461ef admitted and published; tangled CI + image publish workflows ci.yml: fmt + unit suites on push/pr (zat's pattern, pinned zig 0.16.0). publish-image.yml: kaniko builds the Dockerfile natively on x86 and pushes atcr.io/zat.dev/stream: (tranquil-pds's pattern; needs the ATCR_APP_PASSWORD pipeline secret). --- .tangled/workflows/ci.yml | 30 +++++++++++++++++++ .tangled/workflows/publish-image.yml | 44 ++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .tangled/workflows/ci.yml create mode 100644 .tangled/workflows/publish-image.yml diff --git a/.tangled/workflows/ci.yml b/.tangled/workflows/ci.yml new file mode 100644 index 0000000..89156e7 --- /dev/null +++ b/.tangled/workflows/ci.yml @@ -0,0 +1,30 @@ +when: + - event: ["push", "pull_request"] + branch: main + - event: ["manual"] + +engine: nixery + +dependencies: + nixpkgs: + - curl + - gnutar + - xz + +steps: + - name: install zig 0.16 + command: | + curl -sSL https://ziglang.org/download/0.16.0/zig-x86_64-linux-0.16.0.tar.xz | tar -xJ -C /tangled/workspace + mv /tangled/workspace/zig-x86_64-linux-0.16.0 /tangled/workspace/.zig + + - name: check formatting + command: | + /tangled/workspace/.zig/zig fmt --check . + + - name: unit tests (debug) + command: | + /tangled/workspace/.zig/zig build test --summary all + + - name: unit tests (releasesafe) + command: | + /tangled/workspace/.zig/zig build test -Doptimize=ReleaseSafe --summary all diff --git a/.tangled/workflows/publish-image.yml b/.tangled/workflows/publish-image.yml new file mode 100644 index 0000000..5d04515 --- /dev/null +++ b/.tangled/workflows/publish-image.yml @@ -0,0 +1,44 @@ +# Build the linux/amd64 image on a native x86 runner and push it to atcr.io, +# tagged by commit sha only — tags never move, and `scripts/admit verify` +# continues to gate deployment on the receipt-pinned digest. +# +# Requires the ATCR_APP_PASSWORD pipeline secret (repo settings): the +# registry app password for the zat.dev account on atcr.io. + +when: + - event: ["push"] + branch: ["main"] + - event: ["manual"] + +engine: nixery + +dependencies: + nixpkgs: + - kaniko + - coreutils + +environment: + DOCKER_CONFIG: "/kaniko/.docker" + +steps: + - name: configure kaniko + command: | + mkdir -p /kaniko/.docker/ + auth=$(printf 'zat.dev:%s' "$ATCR_APP_PASSWORD" | base64 -w0) + echo "{ + \"auths\": { + \"https://atcr.io/v1\":{ + \"auth\": \"$auth\" + } + } + }" > /kaniko/.docker/config.json + + - name: build and push image + command: | + executor \ + --context=$(pwd) \ + --ignore-path=$(pwd) \ + --dockerfile=$(pwd)/Dockerfile \ + --destination="atcr.io/zat.dev/stream:$TANGLED_COMMIT_SHA" \ + --push-retry=3 \ + --skip-push-permission-check -- 2.51.2