Skip to content

Commit 8bc99ed

Browse files
authored
senzing-factory/build-resources#179 add slack notifications (#32)
1 parent dd7dd9b commit 8bc99ed

File tree

4 files changed

+54
-16
lines changed

4 files changed

+54
-16
lines changed

.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-senzing-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_GITHUB_ORGANIZATION_PROJECT }}
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-senzing.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_GITHUB_ORGANIZATION_PROJECT }}
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/pylint.yaml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,36 @@ permissions:
77

88
jobs:
99
pylint:
10+
outputs:
11+
status: ${{ job.status }}
1012
runs-on: ubuntu-latest
1113
strategy:
1214
matrix:
1315
python-version: ["3.8", "3.9", "3.10"]
1416

1517
steps:
16-
- uses: actions/checkout@v4
17-
18-
- name: set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
23-
- name: install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install pylint
27-
28-
- name: analysing the code with pylint
29-
run: |
30-
# shellcheck disable=SC2046
31-
pylint $(git ls-files '*.py')
18+
- uses: actions/checkout@v4
19+
20+
- name: set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pylint
29+
30+
- name: analysing the code with pylint
31+
run: |
32+
# shellcheck disable=SC2046
33+
pylint $(git ls-files '*.py')
34+
35+
slack-notification:
36+
needs: [pylint]
37+
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pylint.outputs.status ) && github.ref_name == github.event.repository.default_branch }}
38+
secrets:
39+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
40+
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
41+
with:
42+
job-status: ${{ needs.pylint.outputs.status }}

0 commit comments

Comments
 (0)