mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
ci: Fix artifact naming conflict (#53433)
This fixes the issue we saw in https://github.com/zed-industries/zed/actions/runs/24147949240 Release Notes: - N/A
This commit is contained in:
parent
dc3d8f1780
commit
e758d257cf
2 changed files with 14 additions and 5 deletions
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
|
|
@ -687,6 +687,7 @@ jobs:
|
|||
name: compliance-report.md
|
||||
path: target/compliance-report.md
|
||||
if-no-files-found: error
|
||||
overwrite: true
|
||||
- name: send_compliance_slack_notification
|
||||
if: always()
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ const NEEDS_REVIEW_PULLS_URL: &str = "https://github.com/zed-industries/zed/pull
|
|||
|
||||
pub(crate) enum ComplianceContext {
|
||||
Release,
|
||||
ReleaseNonBlocking,
|
||||
Scheduled { tag_source: StepOutput },
|
||||
}
|
||||
|
||||
|
|
@ -165,11 +166,16 @@ pub(crate) fn add_compliance_notification_steps(
|
|||
context: ComplianceContext,
|
||||
compliance_step_id: &str,
|
||||
) -> gh_workflow::Job {
|
||||
let upload_step =
|
||||
upload_artifact(COMPLIANCE_REPORT_FILE).if_condition(Expression::new("always()"));
|
||||
let upload_step = upload_artifact(COMPLIANCE_REPORT_FILE)
|
||||
.if_condition(Expression::new("always()"))
|
||||
.when(matches!(context, ComplianceContext::Release), |step| {
|
||||
step.add_with(("overwrite", true))
|
||||
});
|
||||
|
||||
let (success_prefix, failure_prefix) = match context {
|
||||
ComplianceContext::Release => ("✅ Compliance check passed", "❌ Compliance check failed"),
|
||||
ComplianceContext::Release | ComplianceContext::ReleaseNonBlocking => {
|
||||
("✅ Compliance check passed", "❌ Compliance check failed")
|
||||
}
|
||||
ComplianceContext::Scheduled { .. } => (
|
||||
"✅ Scheduled compliance check passed",
|
||||
"⚠️ Scheduled compliance check failed",
|
||||
|
|
@ -202,7 +208,9 @@ pub(crate) fn add_compliance_notification_steps(
|
|||
.add_env((
|
||||
"COMPLIANCE_TAG",
|
||||
match context {
|
||||
ComplianceContext::Release => Context::github().ref_name().to_string(),
|
||||
ComplianceContext::Release | ComplianceContext::ReleaseNonBlocking => {
|
||||
Context::github().ref_name().to_string()
|
||||
}
|
||||
ComplianceContext::Scheduled { tag_source } => tag_source.to_string(),
|
||||
},
|
||||
))
|
||||
|
|
@ -237,7 +245,7 @@ fn compliance_check() -> NamedJob {
|
|||
|
||||
named::job(add_compliance_notification_steps(
|
||||
job,
|
||||
ComplianceContext::Release,
|
||||
ComplianceContext::ReleaseNonBlocking,
|
||||
"run-compliance-check",
|
||||
))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue