Skip to content

Commit e53a7b4

Browse files
committed
senzing-factory/build-resources#179 add slack notifications
1 parent 9ec0ec6 commit e53a7b4

14 files changed

Lines changed: 115 additions & 9 deletions

.github/workflows/add-labels-standardized.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@ jobs:
1515
ORG_MEMBERSHIP_TOKEN: ${{ secrets.ORG_MEMBERSHIP_TOKEN }}
1616
SENZING_MEMBERS: ${{ secrets.SENZING_MEMBERS }}
1717
uses: senzing-factory/build-resources/.github/workflows/add-labels-to-issue.yaml@v2
18+
19+
slack-notification:
20+
needs: [add-issue-labels]
21+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.add-issue-labels.outputs.job-status) }}
22+
secrets:
23+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
24+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
25+
with:
26+
job-status: ${{ needs.add-issue-labels.outputs.job-status }}

.github/workflows/add-to-project-garage-dependabot.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,12 @@ jobs:
1414
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@v2
1515
with:
1616
project: ${{ vars.SENZING_PROJECT_GARAGE }}
17+
18+
slack-notification:
19+
needs: [add-to-project-dependabot]
20+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.add-to-project-dependabot.outputs.job-status) }}
21+
secrets:
22+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
23+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
24+
with:
25+
job-status: ${{ needs.add-to-project-dependabot.outputs.job-status }}

.github/workflows/add-to-project-garage.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ jobs:
1818
classic: false
1919
project-number: ${{ vars.SENZING_PROJECT_GARAGE }}
2020
org: ${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}
21+
22+
slack-notification:
23+
needs: [add-to-project]
24+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.add-to-project.outputs.job-status) }}
25+
secrets:
26+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
27+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
28+
with:
29+
job-status: ${{ needs.add-to-project.outputs.job-status }}

.github/workflows/bandit.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: bandit
22

33
on:
4+
push:
5+
branches-ignore: [main]
46
pull_request:
57
branches: [main]
68

.github/workflows/black.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: black
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches-ignore: [main]
6+
pull_request:
7+
branches: [main]
48

59
permissions:
610
contents: read

.github/workflows/build-distribution.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ permissions:
88
jobs:
99
build-distribution:
1010
name: Build distribution
11+
outputs:
12+
status: ${{ job.status }}
1113
runs-on: ubuntu-latest
1214
strategy:
1315
fail-fast: false
@@ -42,3 +44,12 @@ jobs:
4244
with:
4345
name: python-package-distributions
4446
path: dist/
47+
48+
slack-notification:
49+
needs: [build-distribution]
50+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.build-distribution.outputs.status ) && github.ref_name == github.event.repository.default_branch }}
51+
secrets:
52+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
53+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
54+
with:
55+
job-status: ${{ needs.build-distribution.outputs.status }}

.github/workflows/check-development-dependencies.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Check development dependencies
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
branches: [main]
46

57
permissions:
68
contents: read

.github/workflows/create-sphinx-documentation.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ permissions:
1111

1212
jobs:
1313
docs:
14+
outputs:
15+
status: ${{ job.status }}
1416
runs-on: ubuntu-latest
1517
strategy:
1618
fail-fast: false
@@ -43,3 +45,12 @@ jobs:
4345
github_token: ${{ secrets.GITHUB_TOKEN }}
4446
publish_dir: _build/
4547
force_orphan: true
48+
49+
slack-notification:
50+
needs: [docs]
51+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.docs.outputs.status ) }}
52+
secrets:
53+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
54+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
55+
with:
56+
job-status: ${{ needs.docs.outputs.status }}

.github/workflows/flake8.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: flake8
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches-ignore: [main]
6+
pull_request:
7+
branches: [main]
48

59
permissions:
610
contents: read

.github/workflows/isort.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: isort
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches-ignore: [main]
6+
pull_request:
7+
branches: [main]
48

59
permissions:
610
contents: read

0 commit comments

Comments
 (0)