Skip to content
29 changes: 23 additions & 6 deletions .github/workflows/build-design-system.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build Design System

on:
push:
paths:
- "packages/design-system/src/tokens/**" # Trigger only when files in the tokens folder change
# push:
# paths:
# - "packages/design-system/src/tokens/**" # Trigger only when files in the tokens folder change
pull_request:
paths:
- "packages/design-system/src/tokens/**"
Expand All @@ -16,19 +16,36 @@ jobs:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # Checkout the branch for the PR

# Step 2: Set up Bun
# Step 2: Cache Bun dependencies
- name: Cache Bun dependencies
id: cache-deps
uses: actions/cache@v4.2.0
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-dependencies-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-dependencies-

# Step 3: Set up Bun
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

# Step 3: Navigate to the design-system package and install dependencies
# Step 4: Install dependencies only if the cache was not restored
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
working-directory: ./packages/design-system
run: bun install

# Step 4: Run the build script
# Step 5: Run the build script
- name: Run build script
working-directory: ./packages/design-system
run: bun run build

# Step 6: Check for changes
- name: Check for changes
- uses: stefanzweifel/git-auto-commit-action@v5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix the auto-commit step syntax.

The current configuration has a syntax error. The step should either be a named step with both name and uses, or just a step with uses.

Apply this diff to fix the syntax:

-    # Step 6: Check for changes
-    - name: Check for changes 
-    - uses: stefanzweifel/git-auto-commit-action@v5
+    # Step 6: Check for changes
+    - name: Check for changes
+      uses: stefanzweifel/git-auto-commit-action@v5
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Step 6: Check for changes
- name: Check for changes
- uses: stefanzweifel/git-auto-commit-action@v5
# Step 6: Check for changes
- name: Check for changes
uses: stefanzweifel/git-auto-commit-action@v5
🧰 Tools
🪛 actionlint (1.7.4)

50-50: step must run script with "run" section or run action with "uses" section

(syntax-check)


🛠️ Refactor suggestion

Add configuration for the auto-commit action.

The auto-commit action is missing essential configuration such as commit message and file patterns. This is important for tracking token updates from zeroheight.

Add configuration like this:

     - name: Check for changes
       uses: stefanzweifel/git-auto-commit-action@v5
+      with:
+        commit_message: "chore: update design system tokens from zeroheight"
+        file_pattern: 'packages/design-system/src/tokens/**'

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 actionlint (1.7.4)

50-50: step must run script with "run" section or run action with "uses" section

(syntax-check)

2 changes: 1 addition & 1 deletion packages/design-system/src/tokens/token_color_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"foreground": {
"$type": "color",
"$value": "{zinc.50}",
"$value": "{zinc.ali2}",
"$description": "Default foreground color of <body />...etc"
},
"information": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,6 @@
"$type": "color",
"$value": "#a1a1aa"
},
"50": {
"$type": "color",
"$value": "#fafafa"
},
"500": {
"$type": "color",
"$value": "#71717a"
Expand All @@ -1015,6 +1011,10 @@
"950": {
"$type": "color",
"$value": "#09090b"
},
"ali2": {
"$type": "color",
"$value": "#fafafa"
}
}
}