Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ci: Reduce compliance notifications on success (#54669)

Finn Eversb9b50e3b9ef9
diff --git a/.github/workflows/compliance_check.yml b/.github/workflows/compliance_check.yml
index f662dfd7073..57b528c94d7 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 c705a7279bc..90c13e820ca 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 045960de57a..c7db50bf6f6 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))