Skip to content

fix: hardcoded deno version publishing broken image for 8.4.x#286

Draft
d-gubert wants to merge 3 commits into
mainfrom
fix/deno-version
Draft

fix: hardcoded deno version publishing broken image for 8.4.x#286
d-gubert wants to merge 3 commits into
mainfrom
fix/deno-version

Conversation

@d-gubert
Copy link
Copy Markdown
Member

No description provided.

@d-gubert
Copy link
Copy Markdown
Member Author

@coderabbitai review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix Rocket.Chat image generation/build issues caused by hardcoded Deno version/checksum handling (notably for 8.4.x), and wires Deno version updates into the automation that generates versioned Dockerfiles.

Changes:

  • Update the node22 template to derive the Deno zip checksum dynamically (with a legacy fallback).
  • Extend build-automation.mjs to also rewrite ENV DENO_VERSION when generating version directories.
  • Adjust CI to run the automation script during build-test, and change 8.4/Dockerfile’s pinned RC_VERSION.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
templates/node22/Dockerfile Adds dynamic Deno checksum retrieval and a legacy digest fallback.
build-automation.mjs Updates generated Dockerfiles to set DENO_VERSION from Rocket.Chat release info.
8.4/Dockerfile Changes pinned Rocket.Chat patch version for the 8.4 minor line.
.github/workflows/build-test.yml Runs the destructive version-regeneration automation during CI builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3 to 6
ENV DENO_VERSION=1.43.5
# Digest for zip version 1.43.5 is not available in the release assets, so we keep it hardcoded as a fallback
ENV DENO_LEGACY_DIGEST='246bf818932c5e11adb85afaaf3c90e65d5cbe14bcaa8ea14d35fc085869775d'

Comment on lines +15 to +18
&& DENO_ZIP_NAME=deno-${ARCH}-unknown-linux-gnu.zip \
&& DENO_DIGEST=$( (curl -fs https://dl.deno.land/release/v${DENO_VERSION}/${DENO_ZIP_NAME}.sha256sum || echo ${DENO_LEGACY_DIGEST}) | awk '{print $1}') \
&& curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/${DENO_ZIP_NAME} --output /tmp/${DENO_ZIP_NAME} \
&& echo "${DENO_DIGEST} /tmp/${DENO_ZIP_NAME}" | sha256sum -c - \
Comment thread build-automation.mjs
Comment on lines +73 to 82
const { nodeVersion, denoVersion } = info;

const nodeMajor = nodeVersion.replace(/([0-9]+)\..*/, '$1');

await exec(`cp -r ./templates/node${nodeMajor} ${minor}`, { shell: "bash" });

await exec(`sed -ri 's/^(ENV RC_VERSION=).*/\\1'"${fullVersion}"'/;' ${minor}/Dockerfile`, { shell: "bash" });
await exec(`sed -ri 's/^(ENV NODE_VERSION=).*/\\1'"${nodeVersion}"'/;' ${minor}/Dockerfile`, { shell: "bash" });
await exec(`sed -ri 's/^(ENV DENO_VERSION=).*/\\1'"${denoVersion}"'/;' ${minor}/Dockerfile`, { shell: "bash" });
}
Comment on lines +77 to +85
- name: Run automation script
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
id: updt
with:
result-encoding: string
script: |
const { default: script } = await import(`${process.env.GITHUB_WORKSPACE}/build-automation.mjs`);
return script(github);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done to trigger CI and see the workflow running. It will be removed before merge.

Comment thread 8.4/Dockerfile
ENV NODE_ENV=production

ENV RC_VERSION=8.4.1
ENV RC_VERSION=8.4.0
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done to trigger CI and see the workflow running. It will be removed before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants