fix(update): make the update flow report the truth and stop wedging #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Install scripts smoke | |
| on: | |
| pull_request: | |
| paths: | |
| - apps/pythinker-web/public/install.sh | |
| - apps/pythinker-web/public/install.ps1 | |
| - .github/workflows/install-smoke.yml | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - apps/pythinker-web/public/install.sh | |
| - apps/pythinker-web/public/install.ps1 | |
| - .github/workflows/install-smoke.yml | |
| permissions: | |
| contents: read | |
| jobs: | |
| smoke: | |
| name: Validate install scripts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Check shell syntax | |
| run: bash -n apps/pythinker-web/public/install.sh | |
| - name: Lint shell installer | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y shellcheck | |
| shellcheck -e SC1091 apps/pythinker-web/public/install.sh | |
| # `bash -n` parses the script but never runs it, so an entrypoint guard | |
| # that never fires under `curl … | bash` passes every static check. Run | |
| # the documented piped form for real; --help exits before any download. | |
| - name: Run piped installer | |
| run: | | |
| set -o pipefail | |
| out=$(cat apps/pythinker-web/public/install.sh | bash -s -- --help) | |
| case "$out" in | |
| *'native curl-bash installer'*) ;; | |
| *) echo "piped install.sh did not run main:"; echo "$out"; exit 1 ;; | |
| esac | |
| - name: Check PowerShell syntax | |
| run: | | |
| pwsh -NoProfile -Command '$errs = $null; [void][System.Management.Automation.Language.Parser]::ParseFile("apps/pythinker-web/public/install.ps1", [ref]$null, [ref]$errs); if ($errs.Count) { $errs; exit 1 }' |