fix(nginx): harden error handling in bash and PowerShell installers #19
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: Update nginx SHA256 checksums | |
| # Triggered automatically when Renovate opens/updates a PR that touches the nginx installers. | |
| # Downloads the new tarballs, calculates SHA256 hashes, and commits them back to the PR branch. | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: [main] | |
| paths: | |
| - 'nginx/nginx_installer.sh' | |
| - 'nginx/nginx_installer.ps1' | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-checksums: | |
| name: Recalculate SHA256 checksums | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.head_ref, 'renovate/') && github.actor == 'renovate[bot]' | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Recalculate and apply checksums | |
| run: | | |
| chmod +x .github/scripts/update-nginx-checksums.sh | |
| .github/scripts/update-nginx-checksums.sh --apply | |
| - name: Commit updated checksums | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add nginx/nginx_installer.sh nginx/nginx_installer.ps1 | |
| if git diff --staged --quiet; then | |
| echo "Checksums are already up to date, nothing to commit." | |
| else | |
| git commit -m "chore: update nginx dependency SHA256 checksums" | |
| git push | |
| fi |