From 404f3e3157e7403a8a4a5bb7aaa75b9d7b6d283e Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Mon, 2 Dec 2024 10:03:55 +0000 Subject: [PATCH] Create size-label.yml (#9) --- .github/workflows/size-label.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/size-label.yml diff --git a/.github/workflows/size-label.yml b/.github/workflows/size-label.yml new file mode 100644 index 0000000..2ccbcc8 --- /dev/null +++ b/.github/workflows/size-label.yml @@ -0,0 +1,28 @@ +name: Label based on PR size + +on: + pull_request: + pull_request_target: + workflow_dispatch: + +jobs: + size-label: + permissions: write-all + runs-on: ubuntu-latest + + steps: + + - name: size-label + if: >- + ( + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository + ) || ( + github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.full_name != github.repository + ) || ( + github.event_name == 'workflow_dispatch' + ) + uses: "pascalgn/size-label-action@v0.5.5" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"