-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (34 loc) · 1.1 KB
/
hot_cves.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Hot CVEs List
on:
schedule:
- cron: '30 */2 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Python
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- run: pip install requests
- name: Change directory to docs and run CVE JSON generator script
run: |
cd /home/runner/work/cve/cve
python .github/getTrending.py
- name: Check for changes and commit if necessary
run: |
cd /home/runner/work/cve/cve
git config --global user.name '0xMarcio'
git config --global user.email '[email protected]'
git remote set-url origin https://github-actions[bot]:[email protected]/0xMarcio/cve.git
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Trending CVEs update $(date +'%Y-%m-%d %H:%M') :robot:"
git push origin main
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}