diff --git a/.github/workflows/jetbrains-updates.yml b/.github/workflows/jetbrains-updates.yml index 0bc5c4e12d8980..f372eddfb8126d 100644 --- a/.github/workflows/jetbrains-updates.yml +++ b/.github/workflows/jetbrains-updates.yml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v4 - name: Install dependencies run: | + curl -fsSL https://github.com/csweichel/oci-tool/releases/download/v0.2.1/oci-tool_0.2.1_linux_amd64.tar.gz | tar xz -C /usr/local/bin + chmod +x /usr/local/bin/oci-tool cd ./components/ide/gha-update-image yarn npm i -g bun diff --git a/components/ide/gha-update-image/lib/code-pin-version.ts b/components/ide/gha-update-image/lib/code-pin-version.ts index c0e41a03494ce8..81c364830861c3 100644 --- a/components/ide/gha-update-image/lib/code-pin-version.ts +++ b/components/ide/gha-update-image/lib/code-pin-version.ts @@ -65,8 +65,8 @@ export async function updateCodeIDEConfigMapJson() { console.log("updating related pinned version", installationCodeVersion); newJson.ideOptions.options.code.versions.unshift({ version: previousCodeVersion, - image: newJson.ideOptions.options.code.image, - imageLayers: newJson.ideOptions.options.code.imageLayers, + image: ideConfigmapJsonObj.ideOptions.options.code.image, + imageLayers: ideConfigmapJsonObj.ideOptions.options.code.imageLayers, }); appendNewVersion = true; } diff --git a/components/ide/gha-update-image/lib/jb-pin-version.ts b/components/ide/gha-update-image/lib/jb-pin-version.ts index 4af1bb31b9575a..caf5440896072b 100644 --- a/components/ide/gha-update-image/lib/jb-pin-version.ts +++ b/components/ide/gha-update-image/lib/jb-pin-version.ts @@ -51,8 +51,8 @@ export const appendPinVersionsIntoIDEConfigMap = async (updatedIDEs: string[] | const previousVersion = await getIDEVersionOfImage(ideConfigMap.ideOptions.options[ide].image); const previousInfo = { version: previousVersion, - image: ideConfigMap.ideOptions.options[ide].image, - imageLayers: ideConfigMap.ideOptions.options[ide].imageLayers, + image: ideConfigMap.ideOptions.options[ide].image.replaceAll("eu.gcr.io/gitpod-core-dev/build", "{{.Repository}}"), + imageLayers: ideConfigMap.ideOptions.options[ide].imageLayers.map((e: string) => e.replaceAll("eu.gcr.io/gitpod-core-dev/build", "{{.Repository}}")), }; if (!updatedIDEs || !updatedIDEs.includes(ide)) {