.github/workflows/update.yml aktualisiert

This commit is contained in:
2026-11-10 18:46:54 +01:00
parent 01a09a9c92
commit a5631555ab
+16 -30
View File
@@ -1,9 +1,9 @@
name: CVE Synchronisation name: CVE Synchronisation
on: on:
workflow_dispatch:
schedule: schedule:
- cron: "17 * * * *" - cron: '17 * * * *'
workflow_dispatch:
permissions: permissions:
contents: write contents: write
@@ -13,42 +13,28 @@ concurrency:
cancel-in-progress: false cancel-in-progress: false
jobs: jobs:
update: mirror:
runs-on: vuln-runner runs-on: vuln-runner
timeout-minutes: 240 timeout-minutes: 240
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
persist-credentials: true
token: ${{ secrets.GITEA_TOKEN }} token: ${{ secrets.GITEA_TOKEN }}
persist-credentials: true
- name: Versionen prüfen fetch-depth: 1
- name: Sync CVE using persistent local cache
run: python3 scripts/sync.py --since-year 2017 --cache-dir /var/cache/vuln-cve
- name: Validate mirror
run: python3 scripts/validate.py
- name: Push changes
run: | run: |
git --version git config user.name 'Vulnerability Bot'
python3 --version git config user.email 'vuln-bot@users.noreply.local'
rsync --version git add -A data state
- name: CVE-Daten aktualisieren
run: |
python3 scripts/sync.py --since-year 2017
- name: Daten validieren
run: |
python3 scripts/validate.py
- name: Änderungen übertragen
run: |
git config user.name "Vulnerability Bot"
git config user.email "vuln-bot@apex-project.de"
git add data/ state/
if git diff --cached --quiet; then if git diff --cached --quiet; then
echo "Keine Änderungen" echo 'No data changes'
exit 0 exit 0
fi fi
git commit -m "CVE sync $(date -u +%Y-%m-%dT%H:%M:%SZ)"
git commit -m "CVE update $(date -u +%F)" git push origin HEAD:main
git push origin HEAD:main