35 lines
958 B
YAML
35 lines
958 B
YAML
name: Red Hat CSAF Mirror
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '53 */4 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: redhat-mirror
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: vuln-runner
|
|
timeout-minutes: 240
|
|
env:
|
|
GITEA_JOB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
GITEA_REPO_URL: https://git.apex-project.de/VULN/vuln-redhat.git
|
|
VULN_CACHE_BASE: /var/lib/act_runner/cache/vuln-redhat
|
|
steps:
|
|
- name: Red Hat CSAF mirror
|
|
shell: bash
|
|
run: |
|
|
set -Eeuo pipefail
|
|
BASE="$VULN_CACHE_BASE"
|
|
mkdir -p "$BASE"
|
|
if [ ! -f "$BASE/repo/scripts/run-cached.sh" ]; then
|
|
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" "$BASE/repo"
|
|
fi
|
|
bash "$BASE/repo/scripts/run-cached.sh"
|