Skip to content

Commit

Permalink
Add workflow to update cluster-monitorinh-operator/versions.yaml
Browse files Browse the repository at this point in the history
This commit adds a github action listener for branch delete event which
happens when upstream -> downstream PR is merged with openshift repos.
Once the event occurs, newly added action invokes rhobs/syncbot workflow
which creates PR to bump the version.yaml.

Signed-off-by: Arunprasad Rajkumar <[email protected]>
  • Loading branch information
arajkumar committed Apr 27, 2022
1 parent e690407 commit 01b0e06
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update Version

on: [delete]

jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- name: Get token to trigger update version workflow
id: update-version
uses: getsentry/action-github-app-token@v1
with:
app_id: ${{ secrets.UPDATE_VERSION_APP_ID }}
private_key: ${{ secrets.UPDATE_VERSION_APP_PRIVATE_KEY }}
scope: ${{ github.repository_owner }}
- name: Trigger update version workflow
run: |
curl -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ steps.update-version.outputs.token }}" \
--request POST \
https://api.github.com/repos/${{ github.repository_owner }}/syncbot/actions/workflows/update-cmo-deps-versions.yaml/dispatches -d '{"ref":"main"}'

0 comments on commit 01b0e06

Please sign in to comment.