Auto Version Bump #2
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: Auto Version Bump | |
| on: | |
| workflow_dispatch: | |
| concurrency: | |
| group: auto-version-bump | |
| cancel-in-progress: false | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Generate workspace matrix | |
| id: set-matrix | |
| run: | | |
| matrix=$(node scripts/ci/generate-auto-bump-matrix.js) | |
| echo "matrix<<EOF" >> $GITHUB_OUTPUT | |
| echo "$matrix" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| batch-dispatch: | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Delay batches (5 min between) | |
| if: ${{ strategy.job-index != 0 }} | |
| run: | | |
| delay=$(( ${{ strategy.job-index }} * 300 )) | |
| echo "Sleeping $delay seconds before triggering batch ${{ strategy.job-index }}..." | |
| sleep $delay | |
| - name: Trigger Version Bump Workflow via GitHub CLI | |
| env: | |
| GH_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} | |
| run: | | |
| echo "Triggering version bump for workspace ${{ matrix.workspace }}" | |
| json_input='${{ toJson(matrix.workspace) }}' | |
| echo "Rendered json_input: $json_input" | |
| gh workflow run version-bump.yml \ | |
| --ref main \ | |
| --field release_line=main \ | |
| --field workspace_input="$json_input" \ | |
| --field version-bump-type=minor |