mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* add nc-broadcast to view initialization.sh logs * include stderr * refactor build * add frontend/config.json as frontend dependency * fix nc-broadcast * always run all workflows * address dependabot alerts * fix build caching * remove registries.json * more efficient build
42 lines
984 B
YAML
42 lines
984 B
YAML
name: Frontend PR
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
frontend:
|
|
name: Build frontend
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Get npm cache directory
|
|
id: npm-cache-dir
|
|
run: |
|
|
echo "::set-output name=dir::$(npm config get cache)"
|
|
- uses: actions/cache@v3
|
|
id: npm-cache
|
|
with:
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Build frontends
|
|
run: make frontends
|
|
|
|
- name: 'Tar files to preserve file permissions'
|
|
run: tar -cvf frontend.tar ENVIRONMENT.txt GIT_HASH.txt frontend/dist frontend/config.json
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: frontend
|
|
path: frontend.tar
|