From 8c880d4805dd7450327aa272f9d44e4f7bed8b5b Mon Sep 17 00:00:00 2001 From: Ilya Lobkov Date: Mon, 6 Jan 2025 17:53:25 +0100 Subject: [PATCH] ci(.github): remove unecessary workflow file from release-2.4 (#12441) Removing unnecessary workflow file Signed-off-by: Ilya Lobkov --- .github/workflows/pr-merged.yaml | 43 -------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/pr-merged.yaml diff --git a/.github/workflows/pr-merged.yaml b/.github/workflows/pr-merged.yaml deleted file mode 100644 index 8660f688af2c..000000000000 --- a/.github/workflows/pr-merged.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: "Notify about updates to Kuma" -on: - push: - tags: - - '*' - pull_request_target: - types: [closed] - branches: - - master - - release-* -jobs: - notify-about-merged-pr: - if: github.event_name != 'pull_request_target' || github.event.pull_request.merged - name: "Notify about merged PR" - runs-on: ubuntu-latest - steps: - - name: "Send repository dispatch event" - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.NOTIFY_BOT_PAT_TOKEN }} - script: | - let branch, pr; - if (context.eventName == "pull_request_target") { - branch = context.payload.pull_request.base.ref; - pr = context.payload.pull_request.number; - } else if (context.eventName == "push") { - const versionRegex = /v?(\d+)\.(\d+)\.\d+/; - const versionMatch = process.env.GITHUB_REF_NAME.match(versionRegex); - if (!versionMatch) { - return; - } - const [_, major, minor] = [...versionMatch]; - branch = `release-${major}.${minor}`; - } - return github.rest.repos.createDispatchEvent({ - owner: '${{ secrets.NOTIFY_OWNER }}', - repo: '${{ secrets.NOTIFY_REPO }}', - event_type: '${{ secrets.NOTIFY_EVENT_TYPE }}', - client_payload: { - branch, - pr, - }, - });