From 95f1d22ef43c1f727e75043ab646cca665acbdf7 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Fri, 29 May 2026 17:09:26 +0545 Subject: [PATCH 1/7] ci: add matrix notification for upgrade testing Signed-off-by: nabim777 --- .github/scripts/notify-to-element.sh | 79 +++++++++++++------ .github/workflows/app-upgrade.yml | 2 +- .github/workflows/nighlty-ci-master.yml | 26 ++++++ .../workflows/nighlty-ci-release-2-branch.yml | 29 ++++++- .../workflows/nighty-ci-release-3-branch.yml | 29 ++++++- .github/workflows/shared_workflow.yml | 24 +----- 6 files changed, 137 insertions(+), 52 deletions(-) diff --git a/.github/scripts/notify-to-element.sh b/.github/scripts/notify-to-element.sh index 25e8cc650..1d00f7d1b 100755 --- a/.github/scripts/notify-to-element.sh +++ b/.github/scripts/notify-to-element.sh @@ -2,6 +2,8 @@ # SPDX-FileCopyrightText: 2023-2024 Jankari Tech Pvt. Ltd. # SPDX-License-Identifier: AGPL-3.0-or-later +set -e + # helper functions log_error() { echo -e "\e[31m$1\e[0m" @@ -15,42 +17,67 @@ log_success() { echo -e "\e[32m$1\e[0m" } -log_info "Fetching all workflow jobs....." +required_vars=( + ELEMENT_CHAT_URL + ELEMENT_ROOM_ID + NIGHTLY_CI_USER_TOKEN + REPO_OWNER + REPO_NAME + RUN_ID + BRANCH_NAME + NEEDS_JSON +) -response=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ - "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/actions/runs/$RUN_ID/jobs?per_page=50") +for var in "${required_vars[@]}"; do + if [[ -z "${!var}" ]]; then + log_error "❌ Missing required environment variable: $var" + log_info "" + log_info "Available environment variables:" + log_info "- ELEMENT_CHAT_URL : URL of the Element chat (e.g. https://matrix.element.io)" + log_info "- ELEMENT_ROOM_ID : Matrix room ID (e.g. abcdefg:matrix.element.io)" + log_info "- NIGHTLY_CI_USER_TOKEN : Access token for sending messages (e.g. "sometoken")" + log_info "- REPO_OWNER : Repository owner (e.g. nextcloud)" + log_info "- REPO_NAME : Repository name (e.g. server)" + log_info "- RUN_ID : GitHub Actions run ID (e.g. 26520692643)" + log_info "- BRANCH_NAME : Branch name (e.g. master)" + log_info "- NEEDS_JSON : JSON string containing job results" + log_info "" + exit 1 + fi +done -log_info "Fetching jobs informations succeeded! -" -if [[ "$response" != *"jobs"* ]]; then - log_error "No jobs found in the below response!" - log_info "$response" +jobs=$(echo "$NEEDS_JSON" | jq -r 'keys[]' 2>/dev/null) +if [[ -z "$jobs" ]]; then + log_error "❌ No jobs found in below JSON:" + log_info "$NEEDS_JSON" exit 1 fi -jobs_informations=$(echo "$response" | jq '.jobs[:-1]') -jobs_conclusions=$(echo "$jobs_informations" | jq -r '.[].conclusion') +results=$(echo "$NEEDS_JSON" | jq -r '.[].result' 2>/dev/null) -workflow_status="Success" -if [[ " ${jobs_conclusions[*]} " == *"failure"* ]]; then - workflow_status="Failure" -elif [[ " ${jobs_conclusions[*]} " == *"cancelled"* ]]; then - workflow_status="Cancelled" -elif [[ " ${jobs_conclusions[*]} " == *"skipped"* ]]; then - workflow_status="Skipped" +workflow_status="✅ Success" +if [[ "${results[*]}" == *"failure"* ]]; then + workflow_status="❌ Failure" +elif [[ "${results[*]}" == *"cancelled"* ]]; then + workflow_status="⚠️ Cancelled" +elif [[ "${results[*]}" == *"skipped"* ]]; then + workflow_status="⚠️ Skipped" fi log_info "Sending report to the element chat...." +payload=$(cat <NC-Nightly-${BRANCH_NAME}

Status: ${workflow_status}" +} +EOF +) + send_message_to_room_response=$(curl -s -XPOST "$ELEMENT_CHAT_URL/_matrix/client/r0/rooms/%21$ELEMENT_ROOM_ID/send/m.room.message?access_token=$NIGHTLY_CI_USER_TOKEN" \ - -d ' - { - "msgtype": "m.text", - "body": "", - "format": "org.matrix.custom.html", - "formatted_body": "NC-Nightly-'$BRANCH_NAME'

Status: '$workflow_status'" - } - ' + -d "$payload" ) if [[ "$send_message_to_room_response" != *"event_id"* ]]; then @@ -59,4 +86,4 @@ if [[ "$send_message_to_room_response" != *"event_id"* ]]; then exit 1 fi -log_success "Notification of the nightly build has been sent to Element chat (OpenProject + Nextcloud)" +log_success "Notification of the nightly build has been sent to Element chat (OpenProject + Nextcloud)" \ No newline at end of file diff --git a/.github/workflows/app-upgrade.yml b/.github/workflows/app-upgrade.yml index 4c36cb65e..98bf6091c 100644 --- a/.github/workflows/app-upgrade.yml +++ b/.github/workflows/app-upgrade.yml @@ -12,7 +12,7 @@ on: nextcloud_versions: required: false type: string - default: "31 32" + default: "33 master" php_versions: required: false type: string diff --git a/.github/workflows/nighlty-ci-master.yml b/.github/workflows/nighlty-ci-master.yml index b2a691155..91b9531ce 100644 --- a/.github/workflows/nighlty-ci-master.yml +++ b/.github/workflows/nighlty-ci-master.yml @@ -15,3 +15,29 @@ jobs: secrets: inherit with: branch: master + + app-upgrade-test: + uses: ./.github/workflows/app-upgrade.yml + with: + branch: master + + notify-nightly-report: + needs: [builds, app-upgrade-test] + if: ${{ always() }} + runs-on: ubuntu-22.04 + steps: + - name: checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + + - name: Notify Element (nightly builds) + env: + ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} + ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} + NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} + REPO_OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + RUN_ID: ${{ github.run_id }} + BRANCH_NAME: master + NEEDS_JSON: ${{ toJson(needs) }} + run: | + ./.github/scripts/notify-to-element.sh \ No newline at end of file diff --git a/.github/workflows/nighlty-ci-release-2-branch.yml b/.github/workflows/nighlty-ci-release-2-branch.yml index 159007a07..4a2ad9b65 100644 --- a/.github/workflows/nighlty-ci-release-2-branch.yml +++ b/.github/workflows/nighlty-ci-release-2-branch.yml @@ -15,4 +15,31 @@ jobs: secrets: inherit with: branch: release/2.11 - nextcloud_versions: "31 32" \ No newline at end of file + nextcloud_versions: "31 32" + + app-upgrade-test: + uses: ./.github/workflows/app-upgrade.yml + with: + branch: release/2.11 + nextcloud_versions: "31 32" + + notify-nightly-report: + needs: [builds, app-upgrade-test] + if: ${{ always() }} + runs-on: ubuntu-22.04 + steps: + - name: checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + + - name: Notify Element (nightly builds) + env: + ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} + ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} + NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} + REPO_OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + RUN_ID: ${{ github.run_id }} + BRANCH_NAME: release/2.11 + NEEDS_JSON: ${{ toJson(needs) }} + run: | + ./.github/scripts/notify-to-element.sh \ No newline at end of file diff --git a/.github/workflows/nighty-ci-release-3-branch.yml b/.github/workflows/nighty-ci-release-3-branch.yml index 568a1555a..f33bcb3a9 100644 --- a/.github/workflows/nighty-ci-release-3-branch.yml +++ b/.github/workflows/nighty-ci-release-3-branch.yml @@ -15,4 +15,31 @@ jobs: secrets: inherit with: branch: release/3.0 - nextcloud_versions: "33" \ No newline at end of file + nextcloud_versions: "33" + + app-upgrade-test: + uses: ./.github/workflows/app-upgrade.yml + with: + branch: release/3.0 + nextcloud_versions: "33" + + notify-nightly-report: + needs: [builds, app-upgrade-test] + if: ${{ always() }} + runs-on: ubuntu-22.04 + steps: + - name: checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + + - name: Notify Element (nightly builds) + env: + ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} + ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} + NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} + REPO_OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + RUN_ID: ${{ github.run_id }} + BRANCH_NAME: release/3.0 + NEEDS_JSON: ${{ toJson(needs) }} + run: | + ./.github/scripts/notify-to-element.sh \ No newline at end of file diff --git a/.github/workflows/shared_workflow.yml b/.github/workflows/shared_workflow.yml index afe994f2e..fa26d4f63 100644 --- a/.github/workflows/shared_workflow.yml +++ b/.github/workflows/shared_workflow.yml @@ -326,26 +326,4 @@ jobs: - name: API Tests env: NEXTCLOUD_BASE_URL: http://localhost - run: make api-test - - notify-nightly-report: - needs: - - js-lint-unit - - api-phpunit-tests - if: ${{ always() && github.event_name == 'schedule' }} - runs-on: ubuntu-22.04 - steps: - - name: checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - - - name: Notify nightly report to element - env: - ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} - ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} - NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO_OWNER: nextcloud - REPO_NAME: integration_openproject - RUN_ID: ${{ github.run_id }} - BRANCH_NAME: ${{ inputs.branch }} - run: ./.github/scripts/notify-to-element.sh + run: make api-test \ No newline at end of file From 5966976ae8f1d40c9b734046a20b2797ed877d6a Mon Sep 17 00:00:00 2001 From: nabim777 Date: Wed, 3 Jun 2026 10:37:05 +0545 Subject: [PATCH 2/7] ci: use master branch only Signed-off-by: nabim777 --- .github/scripts/notify-to-element.sh | 8 +++----- .github/workflows/app-upgrade.yml | 2 +- .github/workflows/nighlty-ci-master.yml | 5 ++--- .github/workflows/nighlty-ci-release-2-branch.yml | 3 +-- .github/workflows/nighty-ci-release-3-branch.yml | 9 ++++----- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/scripts/notify-to-element.sh b/.github/scripts/notify-to-element.sh index 1d00f7d1b..2d4745f7f 100755 --- a/.github/scripts/notify-to-element.sh +++ b/.github/scripts/notify-to-element.sh @@ -21,8 +21,7 @@ required_vars=( ELEMENT_CHAT_URL ELEMENT_ROOM_ID NIGHTLY_CI_USER_TOKEN - REPO_OWNER - REPO_NAME + GITHUB_REPOSITORY RUN_ID BRANCH_NAME NEEDS_JSON @@ -36,8 +35,7 @@ for var in "${required_vars[@]}"; do log_info "- ELEMENT_CHAT_URL : URL of the Element chat (e.g. https://matrix.element.io)" log_info "- ELEMENT_ROOM_ID : Matrix room ID (e.g. abcdefg:matrix.element.io)" log_info "- NIGHTLY_CI_USER_TOKEN : Access token for sending messages (e.g. "sometoken")" - log_info "- REPO_OWNER : Repository owner (e.g. nextcloud)" - log_info "- REPO_NAME : Repository name (e.g. server)" + log_info "- GITHUB_REPOSITORY : GitHub repository (e.g. nextcloud/server)" log_info "- RUN_ID : GitHub Actions run ID (e.g. 26520692643)" log_info "- BRANCH_NAME : Branch name (e.g. master)" log_info "- NEEDS_JSON : JSON string containing job results" @@ -71,7 +69,7 @@ payload=$(cat <NC-Nightly-${BRANCH_NAME}

Status: ${workflow_status}" + "formatted_body": "NC-Nightly-${BRANCH_NAME}

Status: ${workflow_status}" } EOF ) diff --git a/.github/workflows/app-upgrade.yml b/.github/workflows/app-upgrade.yml index 98bf6091c..ee9a81188 100644 --- a/.github/workflows/app-upgrade.yml +++ b/.github/workflows/app-upgrade.yml @@ -12,7 +12,7 @@ on: nextcloud_versions: required: false type: string - default: "33 master" + default: "master" php_versions: required: false type: string diff --git a/.github/workflows/nighlty-ci-master.yml b/.github/workflows/nighlty-ci-master.yml index 91b9531ce..252bb0c06 100644 --- a/.github/workflows/nighlty-ci-master.yml +++ b/.github/workflows/nighlty-ci-master.yml @@ -34,10 +34,9 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - REPO_OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} + GITHUB_REPOSITORY: ${{ github.repository }} RUN_ID: ${{ github.run_id }} - BRANCH_NAME: master + BRANCH_NAME: ${{ github.base_ref }} NEEDS_JSON: ${{ toJson(needs) }} run: | ./.github/scripts/notify-to-element.sh \ No newline at end of file diff --git a/.github/workflows/nighlty-ci-release-2-branch.yml b/.github/workflows/nighlty-ci-release-2-branch.yml index 4a2ad9b65..39b1aa4d1 100644 --- a/.github/workflows/nighlty-ci-release-2-branch.yml +++ b/.github/workflows/nighlty-ci-release-2-branch.yml @@ -36,8 +36,7 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - REPO_OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} + GITHUB_REPOSITORY: ${{ github.repository }} RUN_ID: ${{ github.run_id }} BRANCH_NAME: release/2.11 NEEDS_JSON: ${{ toJson(needs) }} diff --git a/.github/workflows/nighty-ci-release-3-branch.yml b/.github/workflows/nighty-ci-release-3-branch.yml index f33bcb3a9..3dc9c1ec6 100644 --- a/.github/workflows/nighty-ci-release-3-branch.yml +++ b/.github/workflows/nighty-ci-release-3-branch.yml @@ -14,13 +14,13 @@ jobs: uses: ./.github/workflows/shared_workflow.yml secrets: inherit with: - branch: release/3.0 + branch: release/3.1 nextcloud_versions: "33" app-upgrade-test: uses: ./.github/workflows/app-upgrade.yml with: - branch: release/3.0 + branch: release/3.1 nextcloud_versions: "33" notify-nightly-report: @@ -36,10 +36,9 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - REPO_OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} + GITHUB_REPOSITORY: ${{ github.repository }} RUN_ID: ${{ github.run_id }} - BRANCH_NAME: release/3.0 + BRANCH_NAME: release/3.1 NEEDS_JSON: ${{ toJson(needs) }} run: | ./.github/scripts/notify-to-element.sh \ No newline at end of file From 6d57367e20ec1e69f9baf6e41d16f31636353e8c Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 4 Jun 2026 11:59:36 +0545 Subject: [PATCH 3/7] docs: remove env Signed-off-by: nabim777 --- .github/scripts/notify-to-element.sh | 15 ++++++++++----- .github/workflows/nighlty-ci-master.yml | 2 -- .github/workflows/nighlty-ci-release-2-branch.yml | 2 -- .github/workflows/nighty-ci-release-3-branch.yml | 2 -- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/scripts/notify-to-element.sh b/.github/scripts/notify-to-element.sh index 2d4745f7f..f781799aa 100755 --- a/.github/scripts/notify-to-element.sh +++ b/.github/scripts/notify-to-element.sh @@ -21,8 +21,6 @@ required_vars=( ELEMENT_CHAT_URL ELEMENT_ROOM_ID NIGHTLY_CI_USER_TOKEN - GITHUB_REPOSITORY - RUN_ID BRANCH_NAME NEEDS_JSON ) @@ -35,8 +33,6 @@ for var in "${required_vars[@]}"; do log_info "- ELEMENT_CHAT_URL : URL of the Element chat (e.g. https://matrix.element.io)" log_info "- ELEMENT_ROOM_ID : Matrix room ID (e.g. abcdefg:matrix.element.io)" log_info "- NIGHTLY_CI_USER_TOKEN : Access token for sending messages (e.g. "sometoken")" - log_info "- GITHUB_REPOSITORY : GitHub repository (e.g. nextcloud/server)" - log_info "- RUN_ID : GitHub Actions run ID (e.g. 26520692643)" log_info "- BRANCH_NAME : Branch name (e.g. master)" log_info "- NEEDS_JSON : JSON string containing job results" log_info "" @@ -44,6 +40,15 @@ for var in "${required_vars[@]}"; do fi done +# Set from GitHub Actions environment variables +REPOSITORY=$GITHUB_REPOSITORY +RUN_ID=$GITHUB_RUN_ID + +if [[ -z "$REPOSITORY" || -z "$RUN_ID" ]]; then + log_error "❌ GITHUB_REPOSITORY or GITHUB_RUN_ID is empty." + exit 1 +fi + jobs=$(echo "$NEEDS_JSON" | jq -r 'keys[]' 2>/dev/null) if [[ -z "$jobs" ]]; then log_error "❌ No jobs found in below JSON:" @@ -69,7 +74,7 @@ payload=$(cat <NC-Nightly-${BRANCH_NAME}

Status: ${workflow_status}" + "formatted_body": "NC-Nightly-${BRANCH_NAME}

Status: ${workflow_status}" } EOF ) diff --git a/.github/workflows/nighlty-ci-master.yml b/.github/workflows/nighlty-ci-master.yml index 252bb0c06..9a5cf5798 100644 --- a/.github/workflows/nighlty-ci-master.yml +++ b/.github/workflows/nighlty-ci-master.yml @@ -34,8 +34,6 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - GITHUB_REPOSITORY: ${{ github.repository }} - RUN_ID: ${{ github.run_id }} BRANCH_NAME: ${{ github.base_ref }} NEEDS_JSON: ${{ toJson(needs) }} run: | diff --git a/.github/workflows/nighlty-ci-release-2-branch.yml b/.github/workflows/nighlty-ci-release-2-branch.yml index 39b1aa4d1..f3abc9bd7 100644 --- a/.github/workflows/nighlty-ci-release-2-branch.yml +++ b/.github/workflows/nighlty-ci-release-2-branch.yml @@ -36,8 +36,6 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - GITHUB_REPOSITORY: ${{ github.repository }} - RUN_ID: ${{ github.run_id }} BRANCH_NAME: release/2.11 NEEDS_JSON: ${{ toJson(needs) }} run: | diff --git a/.github/workflows/nighty-ci-release-3-branch.yml b/.github/workflows/nighty-ci-release-3-branch.yml index 3dc9c1ec6..5dc5d65e4 100644 --- a/.github/workflows/nighty-ci-release-3-branch.yml +++ b/.github/workflows/nighty-ci-release-3-branch.yml @@ -36,8 +36,6 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - GITHUB_REPOSITORY: ${{ github.repository }} - RUN_ID: ${{ github.run_id }} BRANCH_NAME: release/3.1 NEEDS_JSON: ${{ toJson(needs) }} run: | From d2cf4b12f29d91e9dd128ca5c2d4e4f2178323ac Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 4 Jun 2026 14:56:14 +0545 Subject: [PATCH 4/7] ci: check env empty or not Signed-off-by: nabim777 --- .github/scripts/notify-to-element.sh | 27 ++++++++----------- .github/workflows/nighlty-ci-master.yml | 2 +- .../workflows/nighty-ci-release-3-branch.yml | 4 +-- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/scripts/notify-to-element.sh b/.github/scripts/notify-to-element.sh index f781799aa..d24ea2b72 100755 --- a/.github/scripts/notify-to-element.sh +++ b/.github/scripts/notify-to-element.sh @@ -18,21 +18,25 @@ log_success() { } required_vars=( - ELEMENT_CHAT_URL - ELEMENT_ROOM_ID - NIGHTLY_CI_USER_TOKEN - BRANCH_NAME - NEEDS_JSON + ELEMENT_CHAT_URL + ELEMENT_ROOM_ID + NIGHTLY_CI_USER_TOKEN + GITHUB_REPOSITORY + GITHUB_RUN_ID + BRANCH_NAME + NEEDS_JSON ) for var in "${required_vars[@]}"; do if [[ -z "${!var}" ]]; then log_error "❌ Missing required environment variable: $var" log_info "" - log_info "Available environment variables:" + log_info "Required environment variables:" log_info "- ELEMENT_CHAT_URL : URL of the Element chat (e.g. https://matrix.element.io)" log_info "- ELEMENT_ROOM_ID : Matrix room ID (e.g. abcdefg:matrix.element.io)" log_info "- NIGHTLY_CI_USER_TOKEN : Access token for sending messages (e.g. "sometoken")" + log_info "- GITHUB_REPOSITORY : GitHub repository (e.g. user/repo) set by GitHub Actions environment variable" + log_info "- GITHUB_RUN_ID : GitHub run ID (e.g. 123456789) set by GitHub Actions environment variable" log_info "- BRANCH_NAME : Branch name (e.g. master)" log_info "- NEEDS_JSON : JSON string containing job results" log_info "" @@ -40,15 +44,6 @@ for var in "${required_vars[@]}"; do fi done -# Set from GitHub Actions environment variables -REPOSITORY=$GITHUB_REPOSITORY -RUN_ID=$GITHUB_RUN_ID - -if [[ -z "$REPOSITORY" || -z "$RUN_ID" ]]; then - log_error "❌ GITHUB_REPOSITORY or GITHUB_RUN_ID is empty." - exit 1 -fi - jobs=$(echo "$NEEDS_JSON" | jq -r 'keys[]' 2>/dev/null) if [[ -z "$jobs" ]]; then log_error "❌ No jobs found in below JSON:" @@ -74,7 +69,7 @@ payload=$(cat <NC-Nightly-${BRANCH_NAME}

Status: ${workflow_status}" + "formatted_body": "NC-Nightly-${BRANCH_NAME}

Status: ${workflow_status}" } EOF ) diff --git a/.github/workflows/nighlty-ci-master.yml b/.github/workflows/nighlty-ci-master.yml index 9a5cf5798..4ae9e2011 100644 --- a/.github/workflows/nighlty-ci-master.yml +++ b/.github/workflows/nighlty-ci-master.yml @@ -34,7 +34,7 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - BRANCH_NAME: ${{ github.base_ref }} + BRANCH_NAME: master NEEDS_JSON: ${{ toJson(needs) }} run: | ./.github/scripts/notify-to-element.sh \ No newline at end of file diff --git a/.github/workflows/nighty-ci-release-3-branch.yml b/.github/workflows/nighty-ci-release-3-branch.yml index 5dc5d65e4..a2afddd5e 100644 --- a/.github/workflows/nighty-ci-release-3-branch.yml +++ b/.github/workflows/nighty-ci-release-3-branch.yml @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: 2023-2025 Jankari Tech Pvt. Ltd. # SPDX-License-Identifier: AGPL-3.0-or-later -name: Nightly CI (Release 3.0 branch) +name: Nightly CI (Release 3.1 branch) # workflow can be scheduled ONLY from DEFAULT branch # > This event will only trigger a workflow run if the workflow file is on the default branch. @@ -15,7 +15,7 @@ jobs: secrets: inherit with: branch: release/3.1 - nextcloud_versions: "33" + nextcloud_versions: "33 34" app-upgrade-test: uses: ./.github/workflows/app-upgrade.yml From fdd989c5b380b9767edd67f840539caa4e13de2c Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 4 Jun 2026 15:24:46 +0545 Subject: [PATCH 5/7] ci: check notify Signed-off-by: nabim777 --- .github/workflows/nighty-ci-release-3-branch.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/nighty-ci-release-3-branch.yml b/.github/workflows/nighty-ci-release-3-branch.yml index a2afddd5e..adff2f0de 100644 --- a/.github/workflows/nighty-ci-release-3-branch.yml +++ b/.github/workflows/nighty-ci-release-3-branch.yml @@ -5,9 +5,7 @@ name: Nightly CI (Release 3.1 branch) # workflow can be scheduled ONLY from DEFAULT branch # > This event will only trigger a workflow run if the workflow file is on the default branch. # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule -on: - schedule: - - cron: '0 23 * * *' # run at 11 PM UTC +on: [ pull_request ] jobs: builds: From 73e2a336cff6f9d6392b3dd26e92d53cbf73a139 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 4 Jun 2026 17:04:21 +0545 Subject: [PATCH 6/7] ci: make release 3.0 Signed-off-by: nabim777 --- .github/workflows/nighty-ci-release-3-branch.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nighty-ci-release-3-branch.yml b/.github/workflows/nighty-ci-release-3-branch.yml index adff2f0de..59c60c1a0 100644 --- a/.github/workflows/nighty-ci-release-3-branch.yml +++ b/.github/workflows/nighty-ci-release-3-branch.yml @@ -1,24 +1,26 @@ # SPDX-FileCopyrightText: 2023-2025 Jankari Tech Pvt. Ltd. # SPDX-License-Identifier: AGPL-3.0-or-later -name: Nightly CI (Release 3.1 branch) +name: Nightly CI (Release 3.0 branch) # workflow can be scheduled ONLY from DEFAULT branch # > This event will only trigger a workflow run if the workflow file is on the default branch. # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule -on: [ pull_request ] +on: + schedule: + - cron: '0 23 * * *' # run at 11 PM UTC jobs: builds: uses: ./.github/workflows/shared_workflow.yml secrets: inherit with: - branch: release/3.1 - nextcloud_versions: "33 34" + branch: release/3.0 + nextcloud_versions: "33 master" app-upgrade-test: uses: ./.github/workflows/app-upgrade.yml with: - branch: release/3.1 + branch: release/3.0 nextcloud_versions: "33" notify-nightly-report: From 69a66607cc059ef88c163f18a3b54fe5d2aebb50 Mon Sep 17 00:00:00 2001 From: Sawjan Gurung Date: Thu, 4 Jun 2026 17:23:13 +0545 Subject: [PATCH 7/7] ci: fix branch name Signed-off-by: Sawjan Gurung --- .github/workflows/nighty-ci-release-3-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nighty-ci-release-3-branch.yml b/.github/workflows/nighty-ci-release-3-branch.yml index 59c60c1a0..a8e9b99d9 100644 --- a/.github/workflows/nighty-ci-release-3-branch.yml +++ b/.github/workflows/nighty-ci-release-3-branch.yml @@ -36,7 +36,7 @@ jobs: ELEMENT_CHAT_URL: ${{ secrets.ELEMENT_CHAT_URL }} ELEMENT_ROOM_ID: ${{ secrets.ELEMENT_ROOM_ID }} NIGHTLY_CI_USER_TOKEN: ${{ secrets.NIGHTLY_CI_USER_TOKEN }} - BRANCH_NAME: release/3.1 + BRANCH_NAME: release/3.0 NEEDS_JSON: ${{ toJson(needs) }} run: | ./.github/scripts/notify-to-element.sh \ No newline at end of file