Skip to content

Conversation

@allozaur
Copy link
Collaborator

@allozaur allozaur commented Nov 12, 2025

Close #17207

@github-actions github-actions bot added the devops improvements to build systems and github actions label Nov 12, 2025
- name: Check for changes
id: check-changes
run: |
# Decompress the newly built file and compute its hash
Copy link
Collaborator

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:

- 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 }})
Copy link
Collaborator

@ngxson ngxson Nov 13, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Handle building the webui static output via GH Actions workflow

2 participants