name: "e2e label"

on:
  pull_request_review:
    types: [submitted]

concurrency:
  group: "${{ github.workflow }}-${{ github.ref }}"
  cancel-in-progress: true

jobs:
  label:
    name: "Add e2e label to approved PR"
    if: github.event.review.state == 'approved'
    runs-on: ubuntu-latest
    steps:
      - name: Label when approved
        uses: pullreminders/label-when-approved-action@v1.0.7
        env:
          APPROVALS: "1"
          GITHUB_TOKEN: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}
          ADD_LABEL: "e2e"
