File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Operator Release - Make Bundle
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ branch :
6+ description : " Branch to check out, regenerate bundle on, and push back to"
7+ required : true
8+ type : string
9+ version :
10+ description : " New release version, (e.g. 1.27.0-rc.1)"
11+ required : true
12+ type : string
13+ latest_version :
14+ description : " Previous released version, (e.g. 1.26.0)"
15+ required : true
16+ type : string
17+ correlation_id :
18+ description : " Correlation ID, surfaced in run-name so the caller can find this run"
19+ required : true
20+ type : string
21+
22+ run-name : " operator release - make bundle ${{ inputs.version }} [${{ inputs.correlation_id }}]"
23+
24+ permissions :
25+ contents : read
26+
27+ jobs :
28+ bundle :
29+ runs-on : ubuntu-latest
30+ permissions :
31+ contents : write
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+ with :
36+ ref : ${{ inputs.branch }}
37+ fetch-depth : 0
38+
39+ - name : Set up Go
40+ uses : actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
41+ with :
42+ go-version-file : go.mod
43+
44+ - name : Generate bundle
45+ run : make bundle VERSION=${{ inputs.version }} LATEST_VERSION=${{ inputs.latest_version }}
46+
47+ - name : Commit & push
48+ run : |
49+ # Attribute the commit to the github-actions[bot] account so it links
50+ # to the bot's profile in the GitHub UI. 41898282 is the bot's user ID
51+ # and follows GitHub's standard noreply format: <id>+<user>@users.noreply.github.com.
52+ git config user.name "github-actions[bot]"
53+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
54+ git add -A
55+ if git diff --cached --quiet; then
56+ echo "No bundle changes to commit"
57+ exit 0
58+ fi
59+ git commit -m "chore(bundle): regenerate for v${{ inputs.version }}"
60+ git push origin HEAD:${{ inputs.branch }}
You can’t perform that action at this time.
0 commit comments