-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.4 KB
/
check-repos.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
---
name: Daily Repository Check
on:
schedule:
- cron: "0 8 * * *"
jobs:
checking-repos:
runs-on: ubuntu-latest
strategy:
matrix:
repo: ${{ fromJson(vars.SCHEDULED_REPOS) }}
steps:
- name: Running workflow
id: running-workflow
uses: singnet/das-cicd@master
with:
workflow: ${{ matrix.repo.workflow_id }}
repo: ${{ matrix.repo.name }}
org: singnet
ref: master
github-token: ${{ secrets.GH_TOKEN }}
- name: Send success notification
if: steps.running-workflow.outputs.conclusion == 'success'
uses: singnet/integration-github-mattermost@master
with:
webhook-url: ${{ secrets.SCHEDULED_REPOS_MATTERMOST_WEBHOOK_URL }}
env:
MATTERMOST_MESSAGE: "SUCCESS - CI workflow succeeded in repository ${{ matrix.repo.name }}"
- name: Send failure notification
if: steps.running-workflow.outputs.conclusion != 'success'
uses: singnet/integration-github-mattermost@master
with:
webhook-url: ${{ secrets.SCHEDULED_REPOS_MATTERMOST_WEBHOOK_URL }}
message: |-
FAILURE - CI workflow failed in repository ${{ matrix.repo.name }}
Details: ${{ steps.running-workflow.outputs.run_url }}
Failed job:
${{ steps.running-workflow.outputs.failed_jobs_display }}
@channel