diff --git a/.github/workflows/auto-update-labels.yaml b/.github/workflows/auto-update-labels.yaml new file mode 100644 index 000000000000..273e0f1629f0 --- /dev/null +++ b/.github/workflows/auto-update-labels.yaml @@ -0,0 +1,30 @@ +name: Auto-update labels +on: + push: + paths: + - 'misc/triage/labels.yaml' + branches: + - main + +jobs: + deploy: + name: Auto-update labels + runs-on: ubuntu-latest + steps: + - name: Checkout main + uses: actions/checkout@v3.6.0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + + - name: Install aqua tools + uses: aquaproj/aqua-installer@v2.1.2 + with: + aqua_version: v1.25.0 + + - name: update labels + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: mage label \ No newline at end of file diff --git a/magefiles/magefile.go b/magefiles/magefile.go index 44d12c1c8bb4..ada94c878b31 100644 --- a/magefiles/magefile.go +++ b/magefiles/magefile.go @@ -357,6 +357,12 @@ func Clean() error { return nil } +// Label updates labels +func Label() error { + mg.Deps(Tool{}.Labeler) + return sh.RunV("labeler", "apply", "misc/triage/labels.yaml", "-l", "5") +} + type Docs mg.Namespace // Serve launches MkDocs development server to preview the documentation page