Hybrid cloud cluster monorepo with Ansible, K8s, NixOS, and Terraform. cute.haus
ansible terraform nix k8s
0

Configure Feed

Select the types of activity you want to include in your feed.

justfile: commit digest changes

Aly Raffauf (Jun 23, 2026, 3:54 PM EDT) e1bc1249 3af446d0

+33 -9
+3 -1
.justfile
··· 179 179 echo "tranquil-pds: ✓ up to date" 180 180 exit 0 181 181 fi 182 - echo "tranquil-pds: ${CURRENT_DIGEST:0:19} → ${UPSTREAM:0:19}" 182 + echo "tranquil-pds: ${CURRENT_DIGEST:7:12} → ${UPSTREAM:7:12}" 183 183 sed -i "s|@${CURRENT_DIGEST}|@${UPSTREAM}|" "$TEMPLATE" 184 + git add "$TEMPLATE" 185 + git commit -m "k8s/tranquil-pds: ${FLOAT_TAG}@${CURRENT_DIGEST:7:12} → ${FLOAT_TAG}@${UPSTREAM:7:12}" 184 186 185 187 # Scaffold a new app chart under k8s/charts/<name>. After running, edit the 186 188 # values.yaml and add a release block to k8s/helmfile.yaml. See k8s/charts/README.md.
+30 -8
scripts/bump-image.ts
··· 88 88 return `${image.chartName} (${short})`; 89 89 } 90 90 91 - async function bumpImage(image: PinnedImage, write: boolean): Promise<boolean> { 91 + function shortDigest(digest: string): string { 92 + return digest.slice(7, 19); 93 + } 94 + 95 + async function bumpImage( 96 + image: PinnedImage, 97 + write: boolean, 98 + commitEach: boolean, 99 + ): Promise<boolean> { 92 100 const upstream = await fetchUpstreamDigest(image.repository, image.floatTag); 93 101 if (upstream === image.currentDigest) { 94 102 console.log(`${label(image)}: ✓ up to date`); 95 103 return false; 96 104 } 97 105 98 - console.log( 99 - `${label(image)}: ${image.currentDigest.slice(7, 19)} → ${upstream.slice(7, 19)}`, 100 - ); 106 + const before = shortDigest(image.currentDigest); 107 + const after = shortDigest(upstream); 108 + 109 + console.log(`${label(image)}: ${before} → ${after}`); 101 110 102 111 if (write) { 103 112 const text = await Bun.file(image.templatePath).text(); 104 113 const updated = text.replace(image.currentDigest, upstream); 105 114 await Bun.write(image.templatePath, updated); 115 + 116 + if (commitEach) { 117 + const short = image.repository.split("/").slice(-1)[0]; 118 + const msg = `k8s/${image.chartName} (${short}): ${image.floatTag}@${before} → ${image.floatTag}@${after}`; 119 + await $`git add ${image.templatePath}`; 120 + await $`git commit -m ${msg}`; 121 + } 106 122 } 107 123 return true; 108 124 } ··· 139 155 } 140 156 } 141 157 158 + const commitEach = shouldWrite; 159 + 142 160 let staleCount = 0; 143 161 for (const image of imagesToBump) { 144 - const wasStale = await bumpImage(image, shouldWrite); 162 + const wasStale = await bumpImage(image, shouldWrite, commitEach); 145 163 if (wasStale) staleCount++; 146 164 } 147 165 148 - if (arg === "--check" && staleCount > 0) { 149 - console.error(`\n${staleCount} image(s) stale`); 150 - process.exit(1); 166 + if (staleCount > 0) { 167 + if (arg === "--check") { 168 + console.error(`\n${staleCount} image(s) stale`); 169 + process.exit(1); 170 + } else { 171 + console.log(`\n${staleCount} image(s) bumped`); 172 + } 151 173 }