forked from forkanization/Proxmox-arm64
add reactive-resume status, update build script
This commit is contained in:
27
.github/workflows/frontend-cicd.yml
vendored
27
.github/workflows/frontend-cicd.yml
vendored
@@ -1,5 +1,3 @@
|
||||
# Based on https://github.com/actions/starter-workflows/blob/main/pages/nextjs.yml
|
||||
|
||||
name: Frontend CI/CD
|
||||
|
||||
on:
|
||||
@@ -35,6 +33,31 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install jq
|
||||
run: sudo apt-get update && sudo apt-get install -y jq
|
||||
|
||||
- name: Update JSON statuses
|
||||
run: |
|
||||
JSON_DIR=public/json
|
||||
STATUS_FILE="$JSON_DIR/statuses.json"
|
||||
|
||||
for file in "$JSON_DIR"/*.json; do
|
||||
filename=$(basename "$file")
|
||||
# skip the generated statuses.json itself
|
||||
if [[ "$filename" == "statuses.json" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# pull status from statuses.json; skip if null or empty
|
||||
status=$(jq -r --arg key "$filename" '.[$key] // empty' "$STATUS_FILE")
|
||||
if [[ -n "$status" ]]; then
|
||||
# inject/update top-level "status" field
|
||||
jq --arg st "$status" '.status = $st' "$file" > "$file.tmp"
|
||||
mv "$file.tmp" "$file"
|
||||
echo "→ Updated $filename with status: $status"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user