Skip to content

Commit bcc7620

Browse files
fix: pin docker image and opentower dep to versioned tags (#86)
Replace mutable :latest tags with pinned version numbers to prevent Docker layer caching and Coder image pull from serving stale builds. bump-version.sh now updates coder-template/main.tf and opencode-config-package.json alongside opentower/package.json so all three stay in sync on every release.
1 parent 4cc8c93 commit bcc7620

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

coder-template/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ data "coder_workspace_owner" "me" {}
4444
variable "docker_image" {
4545
description = "Docker image to use for the workspace"
4646
type = string
47-
default = "ghcr.io/mathuraditya724/outpost:latest"
47+
default = "ghcr.io/mathuraditya724/outpost:0.3.0"
4848
}
4949

5050
data "coder_parameter" "gh_token" {

scripts/bump-version.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Craft's built-in auto-bumping runs `npm version` which can fail on
55
# file: deps. We bypass npm entirely by editing package.json with jq.
66
#
7+
# Also bumps:
8+
# - coder-template/main.tf (docker_image default tag)
9+
#
710
# Craft passes the new version via CRAFT_NEW_VERSION.
811
set -euo pipefail
912

@@ -15,11 +18,17 @@ fi
1518

1619
echo "Bumping opentower to ${NEW_VERSION}"
1720

21+
# 1) opentower package.json
1822
PKG="packages/opentower/package.json"
1923
tmp="$(mktemp)"
2024
jq --arg v "$NEW_VERSION" '.version = $v' "$PKG" > "$tmp"
2125
mv "$tmp" "$PKG"
2226
name=$(jq -r '.name' "$PKG")
2327
echo "${name}${NEW_VERSION}"
2428

29+
# 2) Coder template: pin docker_image default to the release tag
30+
TF="coder-template/main.tf"
31+
sed -i "s|ghcr.io/mathuraditya724/outpost:[^\"]*|ghcr.io/mathuraditya724/outpost:${NEW_VERSION}|" "$TF"
32+
echo "${TF} → :${NEW_VERSION}"
33+
2534
echo "Version bump complete."

0 commit comments

Comments
 (0)