From 7d8e34ae148e0126be6f93fa58f6d71ee9b17bd3 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Fri, 24 Apr 2026 10:56:22 +0200 Subject: [PATCH] ci: Reduce compliance notifications on success (#54669) ...What a beatiful syntax to have in a context where anything else would not be evaluated regardless. Release Notes: - N/A --- .github/workflows/compliance_check.yml | 2 +- .github/workflows/release.yml | 4 ++-- tooling/xtask/src/tasks/workflows/release.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compliance_check.yml b/.github/workflows/compliance_check.yml index f662dfd707..57b528c94d 100644 --- a/.github/workflows/compliance_check.yml +++ b/.github/workflows/compliance_check.yml @@ -50,7 +50,7 @@ jobs: path: compliance-report-${{ github.ref_name }}.md if-no-files-found: error - name: send_compliance_slack_notification - if: always() + if: ${{ always() }} run: | if [ "$COMPLIANCE_OUTCOME" == "success" ]; then STATUS="✅ Scheduled compliance check passed for $COMPLIANCE_TAG" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c705a7279b..90c13e820c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -322,7 +322,7 @@ jobs: path: compliance-report-${{ github.ref_name }}.md if-no-files-found: error - name: send_compliance_slack_notification - if: always() + if: ${{ always() }} run: | if [ "$COMPLIANCE_OUTCOME" == "success" ]; then STATUS="✅ Compliance check passed for $COMPLIANCE_TAG" @@ -696,7 +696,7 @@ jobs: if-no-files-found: error overwrite: true - name: send_compliance_slack_notification - if: failure() || needs.compliance_check.outputs.outcome != 'success' + if: ${{ failure() || needs.compliance_check.outputs.outcome != 'success' }} run: | if [ "$COMPLIANCE_OUTCOME" == "success" ]; then STATUS="✅ Compliance check passed for $COMPLIANCE_TAG" diff --git a/tooling/xtask/src/tasks/workflows/release.rs b/tooling/xtask/src/tasks/workflows/release.rs index 045960de57..c7db50bf6f 100644 --- a/tooling/xtask/src/tasks/workflows/release.rs +++ b/tooling/xtask/src/tasks/workflows/release.rs @@ -254,11 +254,11 @@ pub(crate) fn add_compliance_steps( ComplianceContext::Release { non_blocking_outcome, } => Expression::new(format!( - "failure() || {prior_outcome} != 'success'", + "${{{{ failure() || {prior_outcome} != 'success' }}}}", prior_outcome = non_blocking_outcome.expr() )), ComplianceContext::Scheduled { .. } | ComplianceContext::ReleaseNonBlocking => { - Expression::new("always()") + Expression::new("${{ always() }}") } }) .add_env(("SLACK_WEBHOOK", vars::SLACK_WEBHOOK_WORKFLOW_FAILURES))