-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathupdate-design-system-dependency.yml
More file actions
80 lines (66 loc) · 2.62 KB
/
Copy pathupdate-design-system-dependency.yml
File metadata and controls
80 lines (66 loc) · 2.62 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
name: Update design system dependency
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-design-system:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Update @arcadeai/design-system to latest
run: pnpm install @arcadeai/design-system@latest
- name: Check for changes
id: check-changes
run: |
if [ -n "$(git status --porcelain package.json pnpm-lock.yaml)" ]; then
echo "has_changes=true" >> "$GITHUB_OUTPUT"
else
echo "has_changes=false" >> "$GITHUB_OUTPUT"
fi
- name: Run design-system compatibility tests
if: steps.check-changes.outputs.has_changes == 'true'
run: |
pnpm vitest run toolkit-docs-generator/tests/scripts/sync-toolkit-sidebar.test.ts toolkit-docs-generator/tests/sources/oauth-provider-resolver.test.ts
pnpm run build
- name: Create pull request
if: steps.check-changes.outputs.has_changes == 'true'
id: cpr
uses: peter-evans/create-pull-request@v7
env:
HUSKY: 0
SKIP_HUSKY: 1
with:
token: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}
commit-message: "chore: update @arcadeai/design-system to latest"
title: "chore: update @arcadeai/design-system to latest"
body: |
This PR updates `@arcadeai/design-system` to the latest published version.
It runs a design-system compatibility test gate before opening this PR.
If that gate fails, the workflow stops and no PR is created.
- Trigger: `${{ github.event_name }}`
- Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
add-paths: |
package.json
pnpm-lock.yaml
branch: automation/update-design-system-dependency
delete-branch: true
- name: Request team review
if: steps.check-changes.outputs.has_changes == 'true' && steps.cpr.outputs.pull-request-number != ''
continue-on-error: true
run: gh pr edit ${{ steps.cpr.outputs.pull-request-number }} --add-reviewer ArcadeAI/engineering-tools-and-dx
env:
GH_TOKEN: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}