11name : 🐳 Deploy base images
22
3- # Publishes the base images that deployed task containers build on
4- # (triggerdotdev/node:<major>-bookworm and triggerdotdev/bun:<line>-node<major>-bookworm,
5- # each with a -build toolchain variant) to Docker Hub. Tags are mutable and
6- # rebuilt in place; the CLI pins images by digest, so consumers are unaffected
7- # until a digest bump ships in a release.
8- #
9- # Packages install from a Debian snapshot timestamp (recorded in the
10- # dev.trigger.debian-snapshot image label and the job summary), and layers are
11- # exported with normalized timestamps, so any published image can be rebuilt
12- # from the recorded inputs and verified layer for layer.
3+ # Publishes the deploy base images (see base-images/README.md) to Docker Hub.
4+ # Tags are mutable and rebuilt in place; the CLI pins digests, so consumers
5+ # only move when a release bumps its pins.
136
147on :
158 workflow_dispatch :
@@ -77,15 +70,12 @@ jobs:
7770 fi
7871 echo "$SNAPSHOT" | grep -qE '^[0-9]{8}T[0-9]{6}Z$' || { echo "invalid debian_snapshot: $SNAPSHOT"; exit 1; }
7972
80- # Layer and config timestamps come from the snapshot, so images stay
81- # reproducible while the registry shows a meaningful created date
73+ # Snapshot-derived timestamps: reproducible, with a real created date
8274 EPOCH="$(date -u -d "${SNAPSHOT:0:4}-${SNAPSHOT:4:2}-${SNAPSHOT:6:2} ${SNAPSHOT:9:2}:${SNAPSHOT:11:2}:${SNAPSHOT:13:2}Z" +%s)"
83- # A future snapshot resolves to "latest" server-side and a future
84- # epoch stops rewrite-timestamp normalizing mtimes; reject both
75+ # Future snapshots resolve to "latest" and break mtime normalization
8576 [ "$EPOCH" -le "$(date -u +%s)" ] || { echo "debian_snapshot is in the future: $SNAPSHOT"; exit 1; }
8677
87- # Only publish from main; pull requests and branch dispatches
88- # validate the build without pushing
78+ # Pull requests and branch dispatches build without pushing
8979 if [ "$EVENT_NAME" = "pull_request" ] || [ "$REF" != "refs/heads/main" ]; then
9080 PUSH=false
9181 else
@@ -121,8 +111,7 @@ jobs:
121111 with :
122112 persist-credentials : false
123113
124- # Before any image pull so tooling and base pulls count against the
125- # authenticated rate limit; skipped on fork PRs, which have no secrets
114+ # Before any pull so rate limits are authenticated; fork PRs skip (no secrets)
126115 - name : 🐳 Login to Docker Hub
127116 if : env.DOCKERHUB_USERNAME != ''
128117 uses : docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
@@ -138,8 +127,7 @@ jobs:
138127 - name : 🐳 Set up Docker Buildx
139128 uses : docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
140129
141- # Build everything before pushing anything so a build failure can't
142- # leave the runtime and -build tags pointing at different snapshots
130+ # Build both targets before pushing either so the tag pair can't skew
143131 - name : 🐳 Build both targets (no push)
144132 uses : docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
145133 with :
@@ -162,8 +150,6 @@ jobs:
162150 org.opencontainers.image.revision=${{ github.sha }}
163151 dev.trigger.debian-snapshot=${{ needs.setup.outputs.snapshot }}
164152
165- # rewrite-timestamp + SOURCE_DATE_EPOCH make layer blobs a pure
166- # function of the build inputs, so published layers are verifiable
167153 - name : 🐳 Push runtime image
168154 id : build_runtime
169155 if : needs.setup.outputs.push == 'true'
@@ -211,8 +197,7 @@ jobs:
211197 org.opencontainers.image.revision=${{ github.sha }}
212198 dev.trigger.debian-snapshot=${{ needs.setup.outputs.snapshot }}
213199
214- # A repo auto-created private would let the publish go green while every
215- # customer pull fails; require anonymous pullability before declaring success
200+ # An auto-created private repo would publish green while customer pulls fail
216201 - name : 🔎 Verify anonymous pullability
217202 if : needs.setup.outputs.push == 'true'
218203 env :
0 commit comments