Daily Repository Check #149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Daily Repository Check | |
on: | |
schedule: | |
- cron: "0 8 * * *" | |
workflow_dispatch: | |
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 }} | |
message: | | |
SUCCESS - CI workflow succeeded in repository ${{ matrix.repo.name }} | |
${{ fromJson(steps.running-workflow.outputs.logs).benchmark.performbenchmark != '' && format('Benchmark: {0}', fromJson(steps.running-workflow.outputs.logs).benchmark.performbenchmark) || '' }} | |
- 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 }} | |
${{ fromJson(steps.running-workflow.outputs.logs).benchmark.performbenchmark != '' && format('Benchmark: {0}', fromJson(steps.running-workflow.outputs.logs).benchmark.performbenchmark) || '' }} | |
Details: ${{ steps.running-workflow.outputs.run_url }} | |
Failed job: | |
${{ steps.running-workflow.outputs.failed_jobs_display }} | |
@channel |