Skip to content

Commit 7c8d7f5

Browse files
authored
Merge pull request #38 from ChrisgKent/main
Refactor of Schemes and CI for 1.0.0-alpha
2 parents bd23c1b + 698addd commit 7c8d7f5

176 files changed

Lines changed: 10661 additions & 10884 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main-index.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build Index on Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: "schemes/**"
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-index:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v4
20+
with:
21+
enable-cache: true
22+
cache-dependency-glob: ""
23+
24+
- name: Install primaschema
25+
run: uv tool install primaschema
26+
- name: Build index
27+
run: |
28+
primaschema index --primer-schemes-path ./schemes --base-url https://raw.githubusercontent.com/${{github.repository}}/main/schemes > index.json
29+
30+
- name: Commit index.json if changed
31+
run: |
32+
if git diff --quiet -- index.json; then
33+
echo "index.json unchanged"
34+
exit 0
35+
fi
36+
git config user.name "primer-bot"
37+
git config user.email "primer-bot@users.noreply.github.com"
38+
git add index.json
39+
git commit -m "auto update index.json"
40+
git push

.github/workflows/pr-validate.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR Validate Schemes
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
validate:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v4
14+
with:
15+
enable-cache: true
16+
cache-dependency-glob: ""
17+
18+
- name: Install primaschema
19+
run: uv tool install primaschema
20+
21+
- name: Validate schemes
22+
run: |
23+
primaschema validate --all --strict --path ./schemes
24+
25+
- name: Build index (check only)
26+
run: |
27+
primaschema index --primer-schemes-path ./schemes --base-url https://raw.githubusercontent.com/${{github.repository}}/main/schemes > _index.json

.github/workflows/test.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

index.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)