From 89308fc496991d1bd8b0f33b2a1c66cbe911aa94 Mon Sep 17 00:00:00 2001 From: knqyf263 Date: Mon, 13 Jan 2025 17:51:02 +0400 Subject: [PATCH] ci(backport): add workflow to restrict direct PRs to release branches --- .github/workflows/release-pr-check.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/release-pr-check.yaml diff --git a/.github/workflows/release-pr-check.yaml b/.github/workflows/release-pr-check.yaml new file mode 100644 index 000000000000..a9662b1879ce --- /dev/null +++ b/.github/workflows/release-pr-check.yaml @@ -0,0 +1,19 @@ +name: Backport PR Check + +on: + pull_request: + branches: + - 'release/v*' + +jobs: + check-pr-author: + runs-on: ubuntu-latest + steps: + - name: Check PR author + id: check_author + run: | + if [ "${{ github.actor }}" != "aqua-bot" ]; then + echo "::error::This branch is intended for automated backporting by bot. Please refer to the documentation:" + echo "::error::https://trivy.dev/latest/community/maintainer/backporting/" + exit 1 + fi \ No newline at end of file