Skip to content

Commit 549be3d

Browse files
committed
added pr dispatch workflow
Signed-off-by: swastik959 <[email protected]>
1 parent 8327b9a commit 549be3d

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

.github/workflows/release.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,38 @@ jobs:
136136
git add charts/**/*
137137
git commit -m "Update charts to version $version"
138138
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
139-
git push origin "$charts_branch"
139+
git push origin "$charts_branch"
140+
dispatch-chart-release:
141+
permissions:
142+
contents: read
143+
id-token: write
144+
actions: write
145+
runs-on: ubuntu-latest
146+
timeout-minutes: 10
147+
needs: release
148+
if: github.event_name == 'push' && github.ref_type == 'tag'
149+
steps:
150+
- name: Read App Secrets
151+
uses: rancher-eio/read-vault-secrets@main
152+
with:
153+
secrets: |
154+
secret/data/github/repo/${{ github.repository }}/github/workflow-dispatcher/app-credentials appId | APP_ID ;
155+
secret/data/github/repo/${{ github.repository }}/github/workflow-dispatcher/app-credentials privateKey | PRIVATE_KEY
156+
- name: Create App Token
157+
uses: actions/create-github-app-token@v1
158+
id: app-token
159+
with:
160+
app-id: ${{ env.APP_ID }}
161+
private-key: ${{ env.PRIVATE_KEY }}
162+
owner: ${{ github.repository_owner }}
163+
- name: Dispatch to rancher/charts
164+
VERSION_OVERRIDE="minor"
165+
if [[ "${{ github.ref_name }}" == *"-rc"* ]]; then
166+
VERSION_OVERRIDE="auto"
167+
fi
168+
gh workflow run "Manual Trigger for Auto Bump" \
169+
--repo rancher/charts \
170+
--ref dev-v2.10 \
171+
-F chart=rancher-aks-operator \
172+
-F branch=dev-v2.10 \
173+
-F version-override=$VERSION_OVERRIDE

0 commit comments

Comments
 (0)