28 lines
973 B
YAML
28 lines
973 B
YAML
name: Microsoft MSRC Mirror
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '37 */4 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: vuln-runner
|
|
timeout-minutes: 180
|
|
env:
|
|
GITEA_JOB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
GITEA_REPO_URL: https://git.apex-project.de/VULN/vuln-microsoft.git
|
|
VULN_CACHE_BASE: /var/lib/act_runner/cache/vuln-microsoft
|
|
steps:
|
|
- name: Synchronize Microsoft advisory documents
|
|
run: |
|
|
if [ ! -f /var/lib/act_runner/cache/vuln-microsoft/repo/scripts/run-cached.sh ]; then
|
|
mkdir -p /var/lib/act_runner/cache/vuln-microsoft
|
|
AUTH="Authorization: Basic $(printf 'x-access-token:%s' "$GITEA_JOB_TOKEN" | base64 | tr -d '\n')"
|
|
git -c "http.extraHeader=$AUTH" clone --depth 1 --branch main "$GITEA_REPO_URL" /var/lib/act_runner/cache/vuln-microsoft/repo
|
|
fi
|
|
bash /var/lib/act_runner/cache/vuln-microsoft/repo/scripts/run-cached.sh
|