-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Add WebUI auto-build workflow #17217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add WebUI auto-build workflow #17217
Conversation
| - name: Check for changes | ||
| id: check-changes | ||
| run: | | ||
| # Decompress the newly built file and compute its hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simplify this step by using git status? Example:
llama.cpp/.github/workflows/check-vendor.yml
Lines 40 to 52 in a19bd6f
| - name: Check for changes | |
| run: | | |
| set -euo pipefail | |
| # detect modified or untracked files | |
| changed=$(git status --porcelain --untracked-files=all || true) | |
| if [ -n "$changed" ]; then | |
| echo "Vendor sync modified files:" | |
| echo "$changed" | awk '{ print $2 }' | sed '/^$/d' | |
| echo "Failing because vendor files mismatch. Please update scripts/sync_vendor.py" | |
| exit 1 | |
| else | |
| echo "Vendor files are up-to-date." | |
| fi |
| <details> | ||
| <summary>Build details</summary> | ||
|
|
||
| - **Workflow run**: [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While these variables are controlled by us, I think it's safer to use env instead. This will prevent any kind of injection attack in the future
Even better, put this script to a dedicated .js file, so it's more readable, while preventing accidentally injecting code in the future. Example here.
Close #17207