Skip to content

Commit

Permalink
Add slack_notifications_workflows setting to cookiecutter.json
Browse files Browse the repository at this point in the history
To enable extending which GitHub Actions workflows get notifications in
Slack if they fail.
  • Loading branch information
seanh committed Jan 17, 2025
1 parent c51a3d3 commit e7b8ab1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _shared/project/.github/workflows/slack.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Slack
on:
workflow_run:
workflows: [CI{% if cookiecutter._directory in ['pyapp', 'pyramid-app'] %}, Deploy{% endif %}]
workflows: [CI{% if cookiecutter._directory in ['pyapp', 'pyramid-app'] %}, Deploy{% endif %}{{ cookiecutter.get("__slack_notifications_workflows", "") }}]
types: [completed]
branches: [main]
jobs:
Expand Down
3 changes: 2 additions & 1 deletion pyapp/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
"__tests_runner_type": "ubuntu-latest",
"__coverage_runner_type": "ubuntu-latest",
"__functests_runner_type": "ubuntu-latest",
"__scheduled_workflows": ""
"__scheduled_workflows": "",
"__slack_notifications_workflows": ""
}
3 changes: 2 additions & 1 deletion pypackage/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"__tests_runner_type": "ubuntu-latest",
"__coverage_runner_type": "ubuntu-latest",
"__functests_runner_type": "ubuntu-latest",
"__scheduled_workflows": ""
"__scheduled_workflows": "",
"__slack_notifications_workflows": ""
}
3 changes: 2 additions & 1 deletion pyramid-app/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
"__coverage_runner_type": "ubuntu-latest",
"__functests_runner_type": "ubuntu-latest",
"__gunicorn_bind": false,
"__scheduled_workflows": ""
"__scheduled_workflows": "",
"__slack_notifications_workflows": ""
}

0 comments on commit e7b8ab1

Please sign in to comment.