From 26f749e6060f1d3f524c5917cfa417a58e96995b Mon Sep 17 00:00:00 2001 From: Shaun Thompson Date: Wed, 10 Jul 2024 09:09:53 -0400 Subject: [PATCH] introduce PR labeler GHA workflow and configuration Signed-off-by: Shaun Thompson --- .github/dependabot.yml | 2 +- .github/labeler.yml | 155 ++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 19 +++++ 3 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0bdcd51ad89f..4f54b9b2a627 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,5 +11,5 @@ updates: # trigger a new version: https://github.com/docker/buildx/pull/2222#issuecomment-1919092153 - dependency-name: "docker/docs" labels: - - "dependencies" + - "area/dependencies" - "bot" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000000..acf2476c0f66 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,155 @@ +# Add 'project' label to changes in basic project documentation and .github folder, excluding .github/workflows +area/project: + - all: + - changed-files: + - any-glob-to-any-file: + - .github/** + - LICENSE + - AUTHORS + - MAINTAINERS + - PROJECT.md + - README.md + - .gitignore + - codecov.yml + - all-globs-to-all-files: "!.github/workflows/*" + +# Add 'ci' label to changes in the .github/workflows folder +area/ci: + - changed-files: + - any-glob-to-any-file: ".github/workflows/**" + +# Add 'tests' label to changes in test files +area/testing: + - changed-files: + - any-glob-to-any-file: + - tests/** + - "**/*_test.go" + +# area:api +area/api: + - changed-files: + - any-glob-to-any-file: "api/**" + +# area:storage +area/storage: + - changed-files: + - any-glob-to-any-file: + - "cache/**" + - "snapshot/**" + - all-globs-to-all-files: "!cache/remotecache/**" + +# area:remotecache +area/remotecache: + - changed-files: + - any-glob-to-any-file: "cache/remotecache/**" + +# area:client +area/client: + - changed-files: + - any-glob-to-any-file: "client/**" + +# area:llb +area/llb: + - changed-files: + - any-glob-to-any-file: "client/llb/**" + +# area:buildctl +area/buildctl: + - changed-files: + - any-glob-to-any-file: "cmd/buildctl/**" + +# area:buildkitd +area/buildkitd: + - changed-files: + - any-glob-to-any-file: "cmd/buildkitd/**" + +# area:dependencies +area/dependencies: + - changed-files: + - any-glob-to-any-file: + - go.mod + - go.sum + - vendor/** + - tools/** + +# area:docs +area/docs: + - changed-files: + - any-glob-to-any-file: + - "docs/**" + - "frontend/dockerfile/docs/**" + +# area:dockerfile +area/dockerfile: + - changed-files: + - any-glob-to-any-file: "frontend/dockerfile/**" + +# area:dockerfile/checks +area/dockerfile/checks: + - changed-files: + - any-glob-to-any-file: + - "frontend/dockerfile/linter" + - "frontend/dockerfile/subrequests/lint" + +# area:examples +area/examples: + - changed-files: + - any-glob-to-any-file: "examples/**" + +# area:executor +area/executor: + - changed-files: + - any-glob-to-any-file: "executor/**" + +# area:exporter +area/exporter: + - changed-files: + - any-glob-to-any-file: "exporter/**" + +# area:frontend +area/frontend: + - changed-files: + - any-glob-to-any-file: "frontend/**" + +# area:hack +area/hack: + - changed-files: + - any-glob-to-any-file: "hack/**" + +# area:session +area/session: + - changed-files: + - any-glob-to-any-file: "session/**" + +# area:solver +area/solver: + - changed-files: + - any-glob-to-any-file: + - "control/**" + - "solver/**" + +# area:source +area/source: + - changed-files: + - any-glob-to-any-file: "source/**" + +# area:sourcepolicy +area/sourcepolicy: + - changed-files: + - any-glob-to-any-file: "sourcepolicy/**" + +# area:util +area/util: + - changed-files: + - any-glob-to-any-file: "util/**" + +# area:worker +area/worker: + - changed-files: + - any-glob-to-any-file: "worker/**" + +# area:windows +area/windows: + - changed-files: + - any-glob-to-any-file: + - "**/*_windows.go" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000000..53700b0a4953 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,19 @@ +name: labeler + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request_target: + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - + name: Run + uses: actions/labeler@v5