Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds GitHub Actions configuration for Dependabot notifications to Slack #45

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/dependabot-pr-to-slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Notify about PR ready for review

on:
pull_request:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
slackNotification:
name: Slack Notification
if: startsWith(github.head_ref, 'dependabot/') # This step only runs when PR has dependabot/ HEAD
runs-on: ubuntu-latest
steps:
# Latest version available at: https://github.com/actions/checkout/releases
- uses: actions/checkout@v3
- name: Slack Notification
# Latest version available at: https://github.com/kv109/action-ready-for-review/releases
uses: kv109/action-ready-for-review@0.2
env:
SLACK_CHANNEL: alerts
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
19 changes: 19 additions & 0 deletions .github/workflows/dependabot-vulns-to-slack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Dependabot vulnerabilities notification to Slack'

on:
schedule:
- cron: '0 10 * * 1' # At 10:00 on Monday

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
Notify-Vulnerabilites:
runs-on: ubuntu-latest
steps:
# Latest version available at: https://github.com/kunalnagarco/action-cve/releases
- name: Notify Vulnerabilities
uses: kunalnagarco/action-cve@v1.7.33
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}