actions/labeler@v7
Automatically label new pull requests based on the paths of files being changed
At a glance
- Latest major
v7- Repository
- actions/labeler
- Inputs
- 5 (0 required)
- Outputs
- 2
- Runs using
node24- License
- MIT
- Last checked
Inputs and outputs come straight from the action's official action.yml. See our editorial standards.
Usage
- uses: actions/labeler@v7Inputs
| Name | Required | Default | Description |
|---|---|---|---|
repo-token | No | ${{ github.token }} | The GitHub token used to manage labels |
configuration-path | No | .github/labeler.yml | The path for the label configurations |
sync-labels | No | false | Whether or not to remove labels when matching files are reverted |
dot | No | true | Whether or not to auto-include paths starting with dot (e.g. `.github`) |
pr-number | No | none | The pull request number(s) |
Outputs
| Name | Description |
|---|---|
new-labels | A comma-separated list of all new labels |
all-labels | A comma-separated list of all labels that the PR contains |
Read an output with ${{ steps.<step-id>.outputs.<name> }}; the step needs an id.
Examples
Label pull requests by changed paths
Apply labels from the rules in .github/labeler.yml.
name: Example
on:
pull_request_target:
permissions:
contents: read
pull-requests: write
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: Labeler
uses: actions/labeler@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}Each example passed actionlint (syntax, expressions and the inputs it knows for this action). They were not run in a live repository, so replace placeholder values such as names, ARNs and paths with your own.
Something out of date or wrong? Report it on our Contact page. This page is rebuilt from the action's repository roughly once a week.