Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/actions/build-ui/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build UI
description: Restore cached UI HTML artifacts, or set up Node and run script/build-ui on cache miss.

runs:
using: composite
steps:
- name: Cache UI artifacts
id: cache-ui
uses: actions/cache@v5
with:
path: |
pkg/github/ui_dist/get-me.html
pkg/github/ui_dist/issue-write.html
pkg/github/ui_dist/pr-write.html
key: ui-dist-v1-${{ hashFiles('ui/package-lock.json', 'ui/package.json', 'ui/index.html', 'ui/tsconfig*.json', 'ui/vite.config.ts', 'ui/src/**', 'ui/scripts/**') }}
enableCrossOsArchive: true

- name: Set up Node.js
if: steps.cache-ui.outputs.cache-hit != 'true'
uses: actions/setup-node@v6
with:
node-version: "20"
cache: npm
cache-dependency-path: ui/package-lock.json

- name: Build UI
if: steps.cache-ui.outputs.cache-hit != 'true'
shell: bash
run: script/build-ui

- name: Report UI cache status
shell: bash
run: |
if [ "${{ steps.cache-ui.outputs.cache-hit }}" = "true" ]; then
echo "UI artifacts restored from cache (skipped build)."
else
echo "UI artifacts rebuilt from source."
fi
6 changes: 3 additions & 3 deletions .github/workflows/code-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
go-version: ${{ fromJSON(steps.resolve-environment.outputs.environment).configuration.go.version }}
cache: false

- name: Set up Node.js
if: matrix.language == 'go' || matrix.language == 'javascript'
- name: Set up Node.js (for JavaScript CodeQL)
if: matrix.language == 'javascript'
uses: actions/setup-node@v6
with:
node-version: "20"
Expand All @@ -88,7 +88,7 @@ jobs:

- name: Build UI
if: matrix.language == 'go'
run: script/build-ui
uses: ./.github/actions/build-ui

- name: Autobuild
uses: github/codeql-action/autobuild@v4
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ui/package-lock.json

- name: Build UI
run: script/build-ui
uses: ./.github/actions/build-ui

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,8 @@ jobs:
- name: Check out code
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ui/package-lock.json

- name: Build UI
shell: bash
run: script/build-ui
uses: ./.github/actions/build-ui

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ jobs:
- name: Check out code
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ui/package-lock.json

- name: Build UI
run: script/build-ui
uses: ./.github/actions/build-ui

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: gh pr checkout ${{ github.event.pull_request.number }}

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ui/package-lock.json

- name: Build UI
run: script/build-ui
uses: ./.github/actions/build-ui

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Build UI
run: script/build-ui
uses: ./.github/actions/build-ui
- uses: actions/setup-go@v6
with:
go-version: '1.25'
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/mcp-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ jobs:
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '20'

- name: Build UI
run: script/build-ui
uses: ./.github/actions/build-ui

- name: Run MCP Server Diff
uses: SamMorrowDrums/mcp-server-diff@v2.3.5
Expand Down
Loading
Loading