cve/.github/workflows/generate_cve_json.yml
2024-05-27 04:04:11 +02:00

41 lines
1.1 KiB
YAML

name: Generate CVE JSON
on:
push: # This will run the workflow on every push
branches:
- main # Adjust this if you want to run on other branches as well
schedule:
- cron: '0 0 * * *' # This will run the workflow every day at midnight UTC
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Change directory to docs and run CVE JSON generator script
run: |
git checkout main
cd docs
python generate_cve_list.py
- name: Commit and push changes
run: |
cd /home/runner/work/cve/cve
git config --global user.name '0xMarcio'
git config --global user.email 'marc@codepwn.win'
git remote set-url origin https://0xMarcio:$GITHUB_TOKEN@github.com/0xMarcio/cve.git
git add .
git commit -m 'Update CVE list JSON'
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}