Skip to content

Commit

Permalink
fix: publish canary workflow. add danger rule (#3204)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir authored Nov 5, 2024
1 parent 8965c0e commit 7052435
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish_canary.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ame: Publish Canary Image
name: Publish Canary Image
on:
workflow_dispatch:
push:
Expand Down
15 changes: 15 additions & 0 deletions dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,18 @@ async function checkChangesetFiles() {
}
}
checkChangesetFiles()

// -- Check Workflows ------------------------------------------------------------
function checkWorkflows() {
const updatedWorkflows = updated_files.filter(f => f.includes('.github/workflows/'))
const deletedWorkflows = deleted_files.filter(f => f.includes('.github/workflows/'))

for (const f of deletedWorkflows) {
fail(`Workflow file(s) ${f} has been deleted`)
}

for (const f of updatedWorkflows) {
warn(`Workflow file ${f} has been modified`)
}
}
checkWorkflows()

0 comments on commit 7052435

Please sign in to comment.