Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- 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);

Comment on lines +77 to +85

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.

- name: Build image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
Expand Down
2 changes: 1 addition & 1 deletion 8.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ WORKDIR /app

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.


RUN set -eux \
&& apt-get update \
Expand Down
3 changes: 2 additions & 1 deletion build-automation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ export default async function(github) {

const { data: info } = await github.request(`https://releases.rocket.chat/${fullVersion}/info`);

const { nodeVersion } = info;
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 +73 to 82

return newVersions;
Expand Down
12 changes: 8 additions & 4 deletions templates/node22/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM node:22-bookworm-slim

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 3 to 6
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
Expand All @@ -10,10 +12,12 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
esac \
&& set -ex \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip && rm -rf /var/lib/apt/lists/* \
&& curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/deno-${ARCH}-unknown-linux-gnu.zip --output /tmp/deno-${ARCH}-unknown-linux-gnu.zip \
&& echo "246bf818932c5e11adb85afaaf3c90e65d5cbe14bcaa8ea14d35fc085869775d /tmp/deno-x86_64-unknown-linux-gnu.zip" | sha256sum -c - \
&& unzip /tmp/deno-${ARCH}-unknown-linux-gnu.zip -d /tmp \
&& rm /tmp/deno-${ARCH}-unknown-linux-gnu.zip \
&& 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 on lines +15 to +18
&& unzip /tmp/${DENO_ZIP_NAME} -d /tmp \
&& rm /tmp/${DENO_ZIP_NAME} \
&& chmod 755 /tmp/deno \
&& mv /tmp/deno /usr/local/bin/deno \
&& apt-mark auto '.*' > /dev/null \
Expand Down
Loading