Skip to content

Release v4.8.5

Release v4.8.5 #2787

---
name: Labeller (file-based)
"on":
workflow_call:
inputs:
extra-rules:
description: 'YAML describing the additional labelling rules respecting the actions/labeler dialect'
required: false
type: string
pull_request:
concurrency:
# Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# Source: https://mail.python.org/archives/list/pypa-committers@python.org/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
labeller:
name: File-based PR labeller
# Skip labelling:
# 1. On prepare-release branch as it points to a tagged URL that does not exist yet.
# 2. If PR was created/triggered by a bot. That way we can prevent content-rich PRs (like those produced by
# dependabot) to be overly tagged with extra labels.
if: >
github.head_ref != 'prepare-release'
&& github.event.sender.type != 'Bot'
&& github.actor != 'dependabot[bot]'
&& github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
- name: Download default rules
run: >
curl -fsSL --output ./.github/labeller-file-based.yaml
https://raw.githubusercontent.com/kdeldycke/workflows/main/.github/labeller-file-based.yaml
- name: Extend default rules
if: inputs.extra-rules
run: |
tee -a ./.github/labeller-file-based.yaml <<-EOF
${{ inputs.extra-rules }}
EOF
- name: Print all rules
run: |
cat ./.github/labeller-file-based.yaml
- name: Apply rules
uses: actions/labeler@v5.0.0
with:
configuration-path: ".github/labeller-file-based.yaml"
sync-labels: true