Skip to content

Commit 2cc8121

Browse files
committed
senzing-factory/build-resources#179 add slack notifications
1 parent d6fcdc5 commit 2cc8121

12 files changed

Lines changed: 95 additions & 6 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-g2-python-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_G2_PYTHON }}
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-g2-python.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_G2_PYTHON }}
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/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/black.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
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
711

812
jobs:
913
black:
1014
name: black Python ${{ matrix.python-version }}
15+
outputs:
16+
status: ${{ job.status }}
1117
runs-on: ubuntu-latest
1218
strategy:
1319
fail-fast: false
@@ -36,3 +42,12 @@ jobs:
3642
run: |
3743
# shellcheck disable=SC2046
3844
black --diff --check $(git ls-files '*.py' ':!:docs/source/*')
45+
46+
slack-notification:
47+
needs: [black]
48+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.black.outputs.status ) && github.ref_name == github.event.repository.default_branch }}
49+
secrets:
50+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
51+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
52+
with:
53+
job-status: ${{ needs.black.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/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

.github/workflows/mypy.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: mypy
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)