mirror of
https://github.com/nicolargo/glances.git
synced 2026-06-03 11:24:52 -04:00
Bumps the actions group with 2 updates in the / directory: [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) and [actions/setup-node](https://github.com/actions/setup-node). Updates `aquasecurity/trivy-action` from 0.35.0 to 0.36.0 - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](57a97c7e78...ed142fd067) Updates `actions/setup-node` from 6.3.0 to 6.4.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](53b83947a5...48b55a011b) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: aquasecurity/trivy-action dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: webui
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build:
|
|
# continue-on-error: true
|
|
timeout-minutes: 10
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
strategy:
|
|
matrix:
|
|
# Use LTS version only
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
node-version: [24.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Glances will be build with Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
cache-dependency-path: ./glances/outputs/static/package-lock.json
|
|
- name: Build Glances WebUI
|
|
working-directory: ./glances/outputs/static
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
- name: Commit and push WebUI
|
|
env:
|
|
CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
|
|
CI_COMMIT_AUTHOR: Continuous Integration
|
|
run: |
|
|
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
|
git config --global user.email "glances@nicolargo.com"
|
|
git add glances/outputs/static
|
|
if git diff --cached --quiet; then
|
|
echo "No WebUI changes to commit, skipping push."
|
|
exit 0
|
|
fi
|
|
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
|
|
for attempt in 1 2 3; do
|
|
if git pull --rebase origin "${GITHUB_REF_NAME}" && git push; then
|
|
echo "Push succeeded on attempt ${attempt}."
|
|
exit 0
|
|
fi
|
|
echo "Push attempt ${attempt} failed, retrying in $((attempt * 5))s..."
|
|
git rebase --abort 2>/dev/null || true
|
|
sleep $((attempt * 5))
|
|
done
|
|
echo "Push failed after 3 attempts."
|
|
exit 1
|