forked from PSLmodels/OG-Core
-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (33 loc) · 1.25 KB
/
Copy pathcheck_catalog.yml
File metadata and controls
35 lines (33 loc) · 1.25 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
26
27
28
29
30
31
32
33
34
35
name: Check installer catalog
on:
push:
paths:
- 'scripts/install.sh'
- 'scripts/install.ps1'
- 'scripts/repos.json'
- '.github/workflows/check_catalog.yml'
pull_request:
paths:
- 'scripts/install.sh'
- 'scripts/install.ps1'
- 'scripts/repos.json'
- '.github/workflows/check_catalog.yml'
jobs:
catalog-in-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Emit catalog from each installer
run: |
bash scripts/install.sh --list-json > /tmp/catalog_sh.json
pwsh -File scripts/install.ps1 -ListJson > /tmp/catalog_ps.json
- name: Verify install.sh, install.ps1, and repos.json agree
run: |
norm() { jq -S '{schema_version, repos: (.repos | sort_by(.key))}' "$1"; }
if ! diff <(norm scripts/repos.json) <(norm /tmp/catalog_sh.json); then
echo "::error::install.sh --list-json does not match scripts/repos.json"; exit 1
fi
if ! diff <(norm scripts/repos.json) <(norm /tmp/catalog_ps.json); then
echo "::error::install.ps1 -ListJson does not match scripts/repos.json"; exit 1
fi
echo "Catalog in sync across install.sh, install.ps1, and repos.json."