Skip to content

mesh-2815: automate dependabot #25

mesh-2815: automate dependabot

mesh-2815: automate dependabot #25

Workflow file for this run

name: check-header-validator
on:
pull_request:
branches:
- develop
jobs:
check:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/mesh_validate_auth_header'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: make check-secrets
- run: flutter analyze
- run: flutter test -r expanded
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
slack-notification:
runs-on: ubuntu-latest
needs:
- check
if: ${{ always() &&github.actor== 'dependabot[bot]' && contains(needs.*.result, 'failure') }}
steps:
- name: Slack Notification
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c
with:
webhook: ${{ secrets.DEPENDABOT_SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":alarm: DEPENDABOT PR FAILED :alarm:",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Checks failed for ${{ github.repository }}:${{ github.ref }} in <https://github.com/${{ github.repository }}/pull/${{ github.event.number }}|PR #${{ github.event.number }}>"
}
}
]
}