-
-
Notifications
You must be signed in to change notification settings - Fork 16
66 lines (54 loc) · 1.76 KB
/
release_artifacts.yml
File metadata and controls
66 lines (54 loc) · 1.76 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
name: refresh release artifacts
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
branches:
- main
permissions:
contents: write
pull-requests: write
concurrency:
group: release-artifacts-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
refresh-generated-artifacts:
if: github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.event.pull_request.head.ref, 'release-please--branches--')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true
cache_dependency_path: frontend/pnpm-lock.yaml
package_json_file: frontend/package.json
- uses: actions/setup-node@v6
with:
node-version-file: ".tool-versions"
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
working-directory: frontend
- name: Refresh OpenAPI artifacts
run: |
make openapi
make openapi-client
- name: Commit generated artifacts
run: |
if git diff --quiet -- public/openapi.yaml frontend/src/api/generated; then
echo "Generated artifacts already up to date"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add public/openapi.yaml frontend/src/api/generated
git commit -m "chore: refresh release artifacts"
git push