mirror of
https://github.com/0x5t4l1n/CVE.git
synced 2026-05-26 11:25:49 +00:00
feat: add workflow and script to auto-update README when CVE files change
Agent-Logs-Url: https://github.com/Stalin-143/CVE/sessions/23d694ad-2e83-44ad-b08e-57dd48698eac Co-authored-by: Stalin-143 <161853795+Stalin-143@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4fb6319d26
commit
066486aec1
@@ -0,0 +1,41 @@
|
||||
name: Auto-update README on CVE changes
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "reported/**"
|
||||
- "patches/**"
|
||||
|
||||
jobs:
|
||||
update-readme:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Update README.md
|
||||
run: python scripts/update_readme.py
|
||||
|
||||
- name: Commit and push if README changed
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add README.md
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to README.md — skipping commit."
|
||||
else
|
||||
git commit -m "docs: auto-update README CVE tables"
|
||||
git push
|
||||
fi
|
||||
Reference in New Issue
Block a user