From a70e8751d4c3cae6125ed95dfa925f78b37c95fc Mon Sep 17 00:00:00 2001 From: Eva Sarafianou Date: Thu, 30 Jul 2026 19:33:57 +0300 Subject: [PATCH] Gate ci-report and ci-artifacts on relevant-changed to fix skipped-job failures (#37777) server-ci.yml always triggers now, but ci-report and ci-artifacts were missed when #37557 gated the other jobs on needs.go.outputs.relevant-changed. On PRs that don't touch server code, build-mattermost-server and the test jobs are skipped, so ci-artifacts fails trying to download a server-dist-artifact that was never uploaded, and ci-report fails trying to validate test logs that don't exist. Skip both cleanly instead. Co-authored-by: Cursor --- .github/workflows/server-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/server-ci.yml b/.github/workflows/server-ci.yml index eb90c609b4c..5be13f02388 100644 --- a/.github/workflows/server-ci.yml +++ b/.github/workflows/server-ci.yml @@ -391,7 +391,9 @@ jobs: ci-report: name: Server CI Report - if: always() + # Skip cleanly (rather than fail) when no relevant Server CI paths + # changed, since none of the test jobs it reports on will have run. + if: always() && needs.go.outputs.relevant-changed == 'true' permissions: contents: read actions: read @@ -399,6 +401,7 @@ jobs: pull-requests: write issues: write needs: + - go - ci-complete uses: ./.github/workflows/server-ci-report.yml secrets: @@ -414,8 +417,11 @@ jobs: ci-artifacts: name: Server CI Artifacts + # Skip when no relevant Server CI paths changed, since build-mattermost-server + # (and thus server-dist-artifact) will not have run. if: >- success('ci-complete') && + needs.go.outputs.relevant-changed == 'true' && github.repository_owner == 'mattermost' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository @@ -424,6 +430,7 @@ jobs: actions: read statuses: write needs: + - go - ci-complete uses: ./.github/workflows/server-ci-artifacts.yml secrets: