|
1 | | -# Dogfood sync mode: keep THIS repo's committed architecture baseline |
2 | | -# (.codeboarding/analysis.json + rendered docs) current on every push to main, |
3 | | -# so the PR review workflow always diffs against an up-to-date baseline. |
4 | | -# |
5 | | -# This is the ONLY baseline writer for this repo. The manual "rebuild from |
6 | | -# scratch" path (previously a separate refresh-baseline.yml) is now the |
7 | | -# workflow_dispatch + force_full input below, which runs the same tested action |
8 | | -# instead of a hand-rolled copy of its pipeline. |
9 | | - |
10 | 1 | name: CodeBoarding sync |
11 | 2 |
|
12 | 3 | on: |
13 | 4 | push: |
14 | | - branches: [main] |
| 5 | + branches: ['main'] |
15 | 6 | # Loop guard: don't re-trigger on the files this workflow itself commits. |
16 | | - # Deliberately NOT '.codeboarding/**': that would also swallow pushes that |
17 | | - # only edit the user-authored .codeboarding/.codeboardingignore, which |
18 | | - # changes analysis scope and should regenerate the baseline. The action also |
19 | | - # skips re-analyzing its own bot commit as a backstop; the bot commit uses no |
20 | | - # [skip ci] (that would leak through squash-merges and skip real merges). |
| 7 | + # Listed explicitly (not '.codeboarding/**') so editing your own |
| 8 | + # .codeboarding/.codeboardingignore still regenerates the baseline. |
21 | 9 | paths-ignore: |
22 | 10 | - '.codeboarding/*.md' |
23 | 11 | - '.codeboarding/analysis.json' |
|
33 | 21 | default: false |
34 | 22 |
|
35 | 23 | permissions: |
36 | | - contents: write # commit the generated baseline + docs to main |
| 24 | + contents: write # commit the generated baseline + docs to the branch |
| 25 | + id-token: write # mint a GitHub OIDC token for the free hosted tier (omit if you set a key/license) |
37 | 26 |
|
38 | 27 | concurrency: |
39 | | - # Serialize this workflow against itself: a push landing while a manual |
40 | | - # dispatch is mid-run must not produce two concurrent commits to main. |
41 | | - group: codeboarding-baseline-writers |
| 28 | + # Serialize against itself so a push landing mid-run can't make two commits. |
| 29 | + group: codeboarding-sync |
42 | 30 | cancel-in-progress: false |
43 | 31 |
|
44 | 32 | jobs: |
45 | 33 | sync: |
46 | 34 | runs-on: ubuntu-latest |
47 | 35 | timeout-minutes: 60 |
48 | 36 | steps: |
49 | | - # Dogfood: run the action from the checked-out repo (uses: ./) so pushes to |
50 | | - # main exercise the action code on main, not the last published release. |
51 | | - # The action reads its scripts via github.action_path and checks the engine |
52 | | - # and target repo into subdirectories, so this local checkout is untouched. |
53 | | - - uses: actions/checkout@v4 |
54 | | - - uses: ./ |
| 37 | + - uses: CodeBoarding/CodeBoarding-action@v1 |
55 | 38 | with: |
56 | 39 | mode: sync |
57 | 40 | force_full: ${{ inputs.force_full || false }} |
58 | | - llm_api_key: ${{ secrets.OPENROUTER_API_KEY }} |
0 commit comments