diff --git a/.github/workflows/add-label-on-approve.yml b/.github/workflows/add-label-on-approve.yml new file mode 100644 index 00000000000..6f7abb1be90 --- /dev/null +++ b/.github/workflows/add-label-on-approve.yml @@ -0,0 +1,22 @@ +name: Add Label to run extended tests on approve + +on: + pull_request_review: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + label_issues: + if: github.event.review.state == 'commented' && !contains( github.event.pull_request.labels.*.name, '$LABELS') + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - run: gh pr edit "$NUMBER" --add-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.pull_request.number }} + LABELS: extended-tests