Codex/set krakepubinv as default broker 3alspu #1
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: Increment GPAD firmware version | |
| on: | |
| pull_request_target: | |
| branches: ["main"] | |
| types: [closed] | |
| permissions: | |
| contents: write | |
| jobs: | |
| increment-version: | |
| if: github.event.pull_request.merged == true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout latest main branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| - name: Configure version commit identity | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Increment patch version and record merged PR | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| set -euo pipefail | |
| for attempt in 1 2 3 4 5; do | |
| git fetch origin main | |
| git checkout -B main origin/main | |
| if git log --fixed-strings --grep="Bump GPAD firmware version for PR #$PR_NUMBER" --format=%H -- Firmware/GPAD_API/FIRMWARE_VERSION | grep -q .; then | |
| echo "Version commit for PR #$PR_NUMBER already exists; nothing to commit." | |
| exit 0 | |
| fi | |
| python3 scripts/bump_gpad_firmware_version.py --pr-number "$PR_NUMBER" | |
| if git diff --quiet -- Firmware/GPAD_API/FIRMWARE_VERSION; then | |
| echo "Version already includes PR #$PR_NUMBER; nothing to commit." | |
| exit 0 | |
| fi | |
| git add Firmware/GPAD_API/FIRMWARE_VERSION | |
| git commit -m "Bump GPAD firmware version for PR #$PR_NUMBER" | |
| if git push origin HEAD:main; then | |
| exit 0 | |
| fi | |
| echo "main advanced while versioning; retrying from latest main ($attempt/5)." | |
| done | |
| echo "Unable to push GPAD firmware version after 5 attempts." >&2 | |
| exit 1 |