-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (52 loc) · 1.62 KB
/
package-sync-nightly.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
name: Nightly package repository sync
on:
schedule:
# Daily at 23:17
- cron: '17 23 * * *'
env:
ANSIBLE_FORCE_COLOR: True
jobs:
sync-matrix-build:
name: Build package matrix of package repo sync jobs
runs-on: arc-release-train-runner
outputs:
matrix: ${{ steps.matrix-build.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install wget
- name: Install YQ
uses: dcarbone/[email protected]
- name: Create sync matrix
id: matrix-build
# Use YQ to make a list of all unique sync groups, and format as a GH
# actions matrix
run: |
groups=$(yq -o=json -I=0 \
'([.rpm_package_repos[] | .sync_group | select(.) ]) + ([.deb_package_repos[] | .sync_group | select(.) ]) | unique' \
ansible/inventory/group_vars/all/package-repos)
echo -n "matrix={\"sync_group\": " >> $GITHUB_OUTPUT
echo -n $groups >> $GITHUB_OUTPUT
echo "}" >> $GITHUB_OUTPUT
- name: Print sync matrix
run: |
echo "Package sync matrix:"
echo -n "${{ steps.matrix-build.outputs.matrix }}"
sync-matrix-run:
name: Sync
needs:
- sync-matrix-build
strategy:
matrix: ${{ fromJson(needs.sync-matrix-build.outputs.matrix) }}
max-parallel: 1
fail-fast: False
uses: stackhpc/stackhpc-release-train/.github/workflows/package-sync.yml@main
with:
sync_ark: True
sync_test: False
package_sync_group: ${{ matrix.sync_group }}
secrets: inherit