From 7a2a052b67cd01da1a68464ab21e73d5c5d9e8f2 Mon Sep 17 00:00:00 2001 From: Alexandr Date: Sat, 4 Jan 2025 17:07:40 +0200 Subject: [PATCH] ci: add pull requests labeler workflow --- .github/labeler.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..069ac4a --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,32 @@ +ci: + - changed-files: + - any-glob-to-any-file: + - .github/workflows/* + - .github/labeler.yml + +dependencies: + - changed-files: + - any-glob-to-any-file: + - Cargo.toml + - Cargo.lock + +documentation: + - changed-files: + - any-glob-to-any-file: + - README.md + - RELEASE.md + - CHANGELOG.md + - CODE_OF_CONDUCT.md + +github_actions: + - changed-files: + - any-glob-to-any-file: + - .github/workflows/* + - .github/labeler.yml + +rust: + - changed-files: + - any-glob-to-any-file: + - src/* + - examples/* + - benches/* diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..8570bf6 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,27 @@ +name: labeler + +on: + - pull_request_target + +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: write + repository-projects: read + security-events: read + statuses: read + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true