mirror of
https://github.com/0xMarcio/cve.git
synced 2025-06-19 17:30:12 +00:00
Update generate_cve_json.yml
This commit is contained in:
parent
17be2dbf7a
commit
6b5833e800
20
.github/workflows/generate_cve_json.yml
vendored
20
.github/workflows/generate_cve_json.yml
vendored
@ -1,15 +1,15 @@
|
|||||||
|
|
||||||
name: Generate CVE JSON
|
name: Generate CVE JSON
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push: # This will run the workflow on every push
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # Adjust this if you want to run on other branches as well
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -20,18 +20,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Change directory to docs and run CVE JSON generator script
|
- name: Change directory to docs and run CVE JSON generator script
|
||||||
run: |
|
run: |
|
||||||
git checkout main
|
cd /home/runner/work/cve/cve/docs
|
||||||
cd docs
|
|
||||||
python generate_cve_list.py
|
python generate_cve_list.py
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Check for changes and commit if necessary
|
||||||
run: |
|
run: |
|
||||||
cd /home/runner/work/cve/cve
|
cd /home/runner/work/cve/cve
|
||||||
git config --global user.name '0xMarcio'
|
git config --global user.name '0xMarcio'
|
||||||
git config --global user.email 'marc@codepwn.win'
|
git config --global user.email 'marc@codepwn.win'
|
||||||
git remote set-url origin https://github-actions[bot]:$GITHUB_TOKEN@github.com/0xMarcio/cve.git
|
git remote set-url origin https://github-actions[bot]:$GITHUB_TOKEN@github.com/0xMarcio/cve.git
|
||||||
|
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update CVE list `date +'%Y-%m-%d %H:%M'`"
|
git commit -m "Update CVE list $(date +'%Y-%m-%d %H:%M')"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
else
|
||||||
|
echo "No changes to commit"
|
||||||
|
fi
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user