File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 "path" : " frontend/package.json" ,
1212 "jsonpath" : " $.version"
1313 },
14- " public/openapi.yaml" ,
15- " frontend/src/api/generated/client.gen.ts" ,
16- " frontend/src/api/generated/sdk.gen.ts" ,
17- " frontend/src/api/generated/types.gen.ts" ,
18- " frontend/src/api/generated/index.ts"
14+ " public/openapi.yaml"
1915 ]
2016 }
2117 }
Original file line number Diff line number Diff line change @@ -47,10 +47,14 @@ jobs:
4747
4848 openapi :
4949 runs-on : ubuntu-latest
50+ permissions :
51+ contents : write
5052 steps :
5153 - uses : actions/checkout@v6
5254 with :
5355 token : ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
56+ ref : ${{ (github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please--')) && github.head_ref || github.sha }}
57+ fetch-depth : 0
5458
5559 - uses : ruby/setup-ruby@v1
5660 with :
@@ -87,11 +91,16 @@ jobs:
8791 make openapi-client
8892
8993 git add public/openapi.yaml frontend/src/api/generated/
90- git commit -m "chore: regenerate openapi spec and client for version bump"
91- git push
9294
93- echo "## OpenAPI artifacts regenerated" >> "$GITHUB_STEP_SUMMARY"
94- echo "Version bump detected; OpenAPI spec and frontend client have been regenerated and committed." >> "$GITHUB_STEP_SUMMARY"
95+ if git diff --staged --quiet; then
96+ echo "No changes to commit"
97+ else
98+ git commit -m "chore: regenerate openapi spec and client for version bump"
99+ git push origin ${{ github.head_ref }}
100+
101+ echo "## OpenAPI artifacts regenerated" >> "$GITHUB_STEP_SUMMARY"
102+ echo "Version bump detected; OpenAPI spec and frontend client have been regenerated and committed." >> "$GITHUB_STEP_SUMMARY"
103+ fi
95104
96105 - name : Lint OpenAPI contract
97106 run : make openapi-lint
You can’t perform that action at this time.
0 commit comments