From 596055ce2afe713649d27809b176890950998088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Fri, 28 Aug 2026 15:08:07 -0600 Subject: [PATCH] ci: Split PR labeling job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Edgar Ramírez Mondragón --- .github/workflows/pr-labeler.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/release-drafter.yaml | 7 ------- 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/pr-labeler.yaml diff --git a/.github/workflows/pr-labeler.yaml b/.github/workflows/pr-labeler.yaml new file mode 100644 index 0000000..23a1693 --- /dev/null +++ b/.github/workflows/pr-labeler.yaml @@ -0,0 +1,26 @@ +name: PR Labeler + +on: + # zizmor: ignore[dangerous-triggers] pull_request_target is required so + # autolabeler gets write access on PRs from forks; this workflow never + # checks out or executes code from the PR, only calls the labels API. + pull_request_target: + types: [opened, reopened, synchronize] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: {} + +jobs: + autolabel: + name: Autolabel PR + runs-on: ubuntu-24.04 + timeout-minutes: 5 + permissions: + pull-requests: write # to autolabel PRs + steps: + - uses: release-drafter/release-drafter/autolabeler@34d80673e067bdc0c24568d3af899c216adcfaa9 # v7.7.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml index ea1f7ab..f572f79 100644 --- a/.github/workflows/release-drafter.yaml +++ b/.github/workflows/release-drafter.yaml @@ -4,8 +4,6 @@ on: push: branches: - main - pull_request: - types: [opened, reopened, synchronize] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -20,12 +18,7 @@ jobs: timeout-minutes: 5 permissions: contents: write # to create/update the draft release - pull-requests: write # to autolabel PRs steps: - - if: github.event_name == 'pull_request' - uses: release-drafter/release-drafter/autolabeler@34d80673e067bdc0c24568d3af899c216adcfaa9 # v7.7.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: release-drafter/release-drafter@34d80673e067bdc0c24568d3af899c216adcfaa9 # v7.7.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}