32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
name: SUSE CSAF Mirror
|
|
on:
|
|
schedule:
|
|
- cron: "31 */6 * * *"
|
|
workflow_dispatch:
|
|
permissions:
|
|
contents: write
|
|
concurrency:
|
|
group: vuln-suse
|
|
cancel-in-progress: false
|
|
jobs:
|
|
mirror:
|
|
runs-on: vuln-runner
|
|
timeout-minutes: 240
|
|
steps:
|
|
- name: SUSE CSAF aktualisieren (persistenter Git-Checkout)
|
|
env:
|
|
GITEA_JOB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
CACHE_ROOT: /var/lib/act_runner/cache/vuln-suse
|
|
REPO_URL: https://git.apex-project.de/VULN/vuln-suse.git
|
|
run: |
|
|
set -Eeuo pipefail
|
|
# Only the first run needs to bootstrap the local checkout.
|
|
if [ ! -f "$CACHE_ROOT/repo/scripts/run-cached.sh" ]; then
|
|
mkdir -p "$CACHE_ROOT"
|
|
export GIT_CONFIG_COUNT=1
|
|
export GIT_CONFIG_KEY_0=http.extraheader
|
|
export GIT_CONFIG_VALUE_0="Authorization: Basic $(printf 'oauth2:%s' "$GITEA_JOB_TOKEN" | base64 -w0)"
|
|
git clone --depth 1 --branch main "$REPO_URL" "$CACHE_ROOT/repo"
|
|
fi
|
|
bash "$CACHE_ROOT/repo/scripts/run-cached.sh"
|