Skip to content

Commit

Permalink
ci: auto apply labels (#5200)
Browse files Browse the repository at this point in the history
* add label for mage file. Create workflow.

* fix typo

* setup go and aqua tools

* set fetch-depth == 1
  • Loading branch information
DmitriyLewen authored Sep 18, 2023
1 parent 49680dc commit 2e66620
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/auto-update-labels.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e66620

Please sign in to comment.