forked from marxin/cvise
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
25 lines (25 loc) · 1.07 KB
/
Copy pathaction.yml
File metadata and controls
25 lines (25 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: "Setup openSUSE Tumbleweed Snapshot"
description: "Configures zypper to use a stable historical snapshot to bypass CDN flakiness"
runs:
using: "composite"
steps:
- name: Fetch latest stable snapshot date
uses: actions/github-script@v9
id: get-snapshot
with:
script: |
const response = await fetch("https://openqa.opensuse.org/api/v1/job_groups/1/build_results");
const data = await response.json();
// Use index 2 (the 3rd most recent snapshot, roughly 2-3 days old)
// to ensure all global mirrors have fully synced the RPM packages.
// This avoids 404s/timeouts on regional mirrors that lag behind
// live releases.
return data.build_results[2].build;
result-encoding: string
- name: Setup openSUSE snapshot repository
shell: bash
run: |
SNAPSHOT="${{ steps.get-snapshot.outputs.result }}"
echo "Using snapshot: $SNAPSHOT"
zypper rr --all
zypper ar -f http://download.opensuse.org/history/$SNAPSHOT/tumbleweed/repo/oss/ repo-oss