-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 1.82 KB
/
cicd-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CICD Pipeline
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
inputs:
slack-notify:
description: 'Notify Slack'
required: true
default: 'true'
type: choice
options:
- 'true'
- 'false'
env:
SLACK_NOTIFY: true
permissions: read-all
jobs:
bandit:
name: Bandit
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-bandit.yml@master
pycodestyle:
name: Pycodestyle
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-pycodestyle.yml@master
pydocstyle:
name: Pydocstyle
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-pydocstyle.yml@master
pylama:
name: Pylama
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-pylama.yml@master
pylint:
name: Pylint
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-pylint.yml@master
set-slack-notify:
name: Set Slack Notify
runs-on: ubuntu-latest
outputs:
slack-notify: ${{ steps.set-slack-notify.outputs.slack-notify }}
steps:
- name: Set Slack Notify
id: set-slack-notify
run: |
echo "slack-notify=${{ github.event.inputs.slack-notify || env.SLACK_NOTIFY }}" >> "${GITHUB_OUTPUT}"
slack-workflow-status:
if: always() && ${{ github.actor != 'dependabot[bot]' }}
name: Slack Post Workflow Notification
needs:
- bandit
- pycodestyle
- pydocstyle
- pylama
- pylint
- set-slack-notify
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-slack.yml@master
with:
slack_notify: ${{ needs.set-slack-notify.outputs.slack-notify }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}