ci: auto-label pull requests

Use the official labeler action to automatically assign labels to PRs
based on the edited files.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-11-21 14:43:37 +01:00
parent a805e0c69a
commit b9f0fc451a
2 changed files with 60 additions and 0 deletions

39
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,39 @@
area/release:
- .github/**
- _releaser/**
area/build:
- content/build/*
- _vendor/github.com/moby/buildkit/**
- _vendor/github.com/docker/buildx/**
area/compose:
- content/compose/**
- _vendor/github.com/docker/compose/**
- _vendor/github.com/docker/compose-spec/**
area/desktop:
- content/desktop/**
area/engine:
- content/engine/**
- content/config/**
area/security:
- content/security/**
area/get-started:
- content/get-started/**
area/networking:
- content/network/**
area/hub:
- content/docker-hub/**
area/cli:
- content/engine/reference/commandline/**
- _vendor/github.com/docker/cli/**
area/api:
- content/engine/api/**

21
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: labeler
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request_target:
jobs:
labeler:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
-
name: Run
uses: actions/labeler@v4
with:
dot: true