From 0a5714bba16197c8f9c9194d3353a598838afaa8 Mon Sep 17 00:00:00 2001 From: Arunprasad Rajkumar Date: Tue, 8 Mar 2022 15:11:09 +0530 Subject: [PATCH] Add workflow to update cluster-monitorinh-operator/versions.yaml 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 --- .github/workflows/update-version.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/update-version.yaml diff --git a/.github/workflows/update-version.yaml b/.github/workflows/update-version.yaml new file mode 100644 index 0000000000..007ff57fdd --- /dev/null +++ b/.github/workflows/update-version.yaml @@ -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"}'