Skip to content

Commit 012ffb6

Browse files
committed
added pr dispatch workflow
Signed-off-by: swastik959 <Sswastik959@gmail.com>
1 parent c9d5fdc commit 012ffb6

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

.github/workflows/release.yaml

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

0 commit comments

Comments
 (0)