Skip to content
Closed
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
7 changes: 7 additions & 0 deletions .changeset/proud-dryers-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/core-typings": minor
---

Fixes the time display in calendar event notifications by converting the UTC time to the local time.

102 changes: 65 additions & 37 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ inputs:
required: true
description: 'Deno version'
type: string
platform:
arch:
required: false
description: 'Platform'
default: 'alpine'
build-containers:
description: 'Architecture'
default: 'amd64'
service:
required: false
description: 'Containers to build along with Rocket.Chat'
description: 'Container to build'
type: string
turbo-cache:
required: false
Expand Down Expand Up @@ -49,61 +49,89 @@ runs:
username: ${{ inputs.CR_USER }}
password: ${{ inputs.CR_PAT }}

- name: Restore build
- name: Restore packages build
uses: actions/download-artifact@v4
with:
name: packages-build
path: /tmp

- name: Unpack packages build
shell: bash
run: |
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .

- name: Restore meteor build
if: inputs.service == 'rocketchat'
uses: actions/download-artifact@v4
with:
name: build
path: /tmp/build

- name: Unpack build
- name: Unpack meteor build
if: inputs.service == 'rocketchat'
shell: bash
run: |
cd /tmp/build
tar xzf Rocket.Chat.tar.gz
rm Rocket.Chat.tar.gz

- uses: rharkor/caching-for-turbo@v1.5
# if we are testing a PR from a fork, we already called the turbo cache at this point, so it should be false
if: inputs.turbo-cache == 'true'

- name: Setup NodeJS
uses: ./.github/actions/setup-node
if: inputs.setup == 'true'
- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": true
}
}

- name: Restore turbo build
uses: actions/download-artifact@v4
- uses: docker/setup-buildx-action@v3
with:
name: turbo-build
path: .turbo/cache

- run: yarn build
if: inputs.setup == 'true'
shell: bash
buildkitd-flags: --oci-worker-gc --oci-worker-gc-keepstorage=4000

- name: Build Docker images
shell: bash
run: |
args=(rocketchat ${{ inputs.build-containers }})

set -o xtrace
export DENO_VERSION="${{ inputs.deno-version }}"

docker compose -f docker-compose-ci.yml build "${args[@]}"
if [[ "${{ inputs.publish-image }}" == 'true' ]]; then
LOAD_OR_PUSH="--push"
else
LOAD_OR_PUSH="--load"
fi

- name: Publish Docker images to GitHub Container Registry
if: inputs.publish-image == 'true' && github.actor != 'dependabot[bot]' && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop')
shell: bash
run: |
args=(rocketchat ${{ inputs.build-containers }})
docker buildx bake \
-f docker-compose-ci.yml \
${LOAD_OR_PUSH} \
--allow=fs.read=/tmp/build \
--set "*.labels.org.opencontainers.image.description=Build run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
--set *.platform=linux/${{ inputs.arch }} \
--set *.cache-from=type=gha \
--set *.cache-to=type=gha,mode=max \
--provenance=false \
--sbom=false \
--metadata-file "/tmp/meta.json" \
"${{ inputs.service }}"

echo "Contents of /tmp/meta.json:"
cat /tmp/meta.json

docker compose -f docker-compose-ci.yml push "${args[@]}"
mkdir -p /tmp/digests/${{ inputs.service }}/${{ inputs.arch }}
DIGEST=$(jq -r '.["${{ inputs.service }}"].["containerimage.digest"]' "/tmp/meta.json")
IMAGE_NO_TAG=$(jq -r '.["${{ inputs.service }}"].["image.name"] | if type=="array" then .[0] else . end' /tmp/meta.json | sed 's/:.*$//')
echo "${IMAGE_NO_TAG}@${DIGEST}" > "/tmp/digests/${{ inputs.service }}/${{ inputs.arch }}/digest.txt"

- uses: actions/upload-artifact@v4
if: inputs.publish-image == 'true'
with:
name: digests-${{ inputs.service }}-${{ inputs.arch }}
path: /tmp/digests
retention-days: 5

- name: Clean up temporary files
if: inputs.service == 'rocketchat'
shell: bash
run: |
sudo rm -rf /tmp/bundle
sudo rm -rf /tmp/build
1 change: 1 addition & 0 deletions .github/actions/meteor-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ runs:

- name: Cache vite
uses: actions/cache@v3
if: steps.cache-build.outputs.cache-hit != 'true'
with:
path: ./node_modules/.vite
key: vite-local-cache-${{ runner.OS }}-${{ hashFiles('package.json') }}
Expand Down
15 changes: 8 additions & 7 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ runs:
apps/meteor/ee/server/services/node_modules
packages/apps-engine/node_modules
packages/apps-engine/.deno-cache
key: node-modules-${{ hashFiles('yarn.lock') }}-deno-v${{ inputs.deno-version }}-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}
key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock') }}-deno-v${{ inputs.deno-version }}-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}
#
# Could use this command to list all paths to save:
# find . -name 'node_modules' -prune | grep -v "/\.meteor/" | grep -v "/meteor/packages/"
Expand All @@ -63,13 +63,14 @@ runs:
with:
deno-version: ${{ inputs.deno-version }}

- name: yarn login
shell: bash
if: inputs.NPM_TOKEN
run: |
echo "//registry.npmjs.org/:_authToken=${{ inputs.NPM_TOKEN }}" > ~/.npmrc
# - name: yarn login
# shell: bash
# if: inputs.NPM_TOKEN
# run: |
# echo "//registry.npmjs.org/:_authToken=${{ inputs.NPM_TOKEN }}" > ~/.npmrc

- name: yarn install
if: inputs.install
shell: bash
run: YARN_ENABLE_HARDENED_MODE=${{ inputs.HARDENED_MODE }} yarn
# run: YARN_ENABLE_HARDENED_MODE=${{ inputs.HARDENED_MODE }} yarn
run: yarn
12 changes: 2 additions & 10 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
lowercase-repo:
required: true
type: string
rc-dockerfile:
required: true
type: string
rc-docker-tag:
required: true
type: string
gh-docker-tag:
required: true
type: string
Expand Down Expand Up @@ -76,17 +70,14 @@ env:
jobs:
test:
runs-on: ubuntu-24.04
env:
RC_DOCKERFILE: ${{ inputs.rc-dockerfile }}.${{ (matrix.mongodb-version == '8.2' && 'debian' && false) || 'alpine' }}
RC_DOCKER_TAG: ${{ inputs.rc-docker-tag }}.${{ (matrix.mongodb-version == '8.2' && 'debian' && false) || 'alpine' }}

strategy:
fail-fast: false
matrix:
mongodb-version: ${{ fromJSON(inputs.mongodb-version) }}
shard: ${{ fromJSON(inputs.shard) }}

name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'false' && ' [legacy watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }}) - ${{ (matrix.mongodb-version == '8.2' && 'Debian' && false) || 'Alpine (Official)' }}
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'false' && ' [legacy watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }})

steps:
- name: Collect Workflow Telemetry
Expand Down Expand Up @@ -153,6 +144,7 @@ jobs:
# the same reason we need to rebuild the docker image at this point is the reason we dont want to publish it
publish-image: false
setup: false
service: 'rocketchat'
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Set DEBUG_LOG_LEVEL (debug enabled)
Expand Down
Loading
Loading