65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
name: UI Build
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'ui/**'
|
|
pull_request:
|
|
paths:
|
|
- 'ui/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-ui:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
cache: 'npm'
|
|
cache-dependency-path: ui/package-lock.json
|
|
|
|
- name: Install Dependencies
|
|
working-directory: ui
|
|
run: npm ci
|
|
|
|
- name: Build UI
|
|
working-directory: ui
|
|
run: npm run build
|
|
|
|
- name: Check for changes
|
|
id: check_changes
|
|
run: |
|
|
git add src/ui_*.h
|
|
echo "changes=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create Pull Request
|
|
if: steps.check_changes.outputs.changes > '0'
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
commit-message: 'chore: update UI build outputs'
|
|
title: 'Update UI build outputs'
|
|
body: |
|
|
This PR updates the UI build outputs (header files) based on changes in the UI source code.
|
|
Changes were automatically generated by the UI build workflow.
|
|
Original trigger: ${{ github.event_name }} ${{ github.ref }}
|
|
branch: update-ui-build-${{ github.sha }}
|
|
delete-branch: true
|
|
base: ${{ github.event.pull_request.head.ref || github.ref_name }}
|
|
add-paths: |
|
|
src/ui_*.h
|
|
labels: |
|
|
automated pr
|
|
ui
|