CVE-Notif-action #5169
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: CVE-Notif-action | |
on: | |
schedule: | |
- cron: '0 */2 * * *' | |
workflow_dispatch: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@v2.2.2 | |
- name: Setup Dependencies | |
run: python3 -m pip install -r requirements.txt | |
- name: Run CVEs Monitor | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
VULNERS_API_KEY: ${{ secrets.VULNERS_API_KEY }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
PUSHOVER_DEVICE_NAME: ${{ secrets.PUSHOVER_DEVICE_NAME }} | |
PUSHOVER_USER_KEY: ${{ secrets.PUSHOVER_USER_KEY }} | |
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }} | |
MSTEAMS_WEBHOOK_URL: ${{ secrets.MSTEAMS_WEBHOOK_URL }} | |
run: python3 cve-notif.py | |
shell: bash | |
- name: Create local changes | |
run: git add output/cve-notif.json | |
- name: Commit results to Github | |
run: | | |
git config --local user.email "" | |
git config --global user.name "Bot-CVE-Notif" | |
git commit -m "Bot auto update" -a --allow-empty | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |