-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (81 loc) · 2.55 KB
/
Copy pathci.yml
File metadata and controls
82 lines (81 loc) · 2.55 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Layer 0 Static Verify
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
static-check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Run T0 static verify
shell: pwsh
run: pwsh .opencode/tests/T0-static-verify.ps1
verify:
runs-on: ubuntu-latest
needs: static-check
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Run image anchor verify
shell: pwsh
run: pwsh scripts/verify-images.ps1
- name: Run T1 consistency check
shell: pwsh
run: pwsh .opencode/tests/T1-readme-consistency.ps1
sync-docs:
runs-on: ubuntu-latest
needs: verify
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip sync]')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sync deployment manual from agent YAML
shell: pwsh
run: pwsh scripts/sync-docs.ps1
- name: Commit doc sync
if: success()
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git diff --quiet docs/ && echo "No doc changes" && exit 0
git add docs/*.md
git commit -m "docs: auto-sync deployment manual from agents [skip ci]"
git pull --rebase origin master
git push
translate:
runs-on: ubuntu-latest
needs: sync-docs
if: github.event_name == 'push' && contains(github.event.head_commit.message, 'README') && !contains(github.event.head_commit.message, '[skip sync]')
permissions:
models: read
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Auto-translate READMEs
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$env:GITHUB_TOKEN = "${{ secrets.GITHUB_TOKEN }}"
pwsh scripts/translate-readmes.ps1
- name: Commit translations
if: success()
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git diff --quiet README.*.md && echo "No translation changes" && exit 0
git add README.*.md
git commit -m "i18n: auto-translate READMEs [skip ci]"
git pull --rebase origin master
git push