forked from redhat-developer/rhdh-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.55 KB
/
auto-version-bump.yml
File metadata and controls
52 lines (45 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Generate workspace matrix
id: set-matrix
run: |
matrix=$(node scripts/ci/generate-auto-bump-matrix.js)
echo "matrix=$matrix" >> $GITHUB_OUTPUT
batch-dispatch:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
- name: Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # 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 batch ${{ strategy.job-index }}"
json_input='${{ toJson(matrix.batch) }}'
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