diff --git a/.github/labeler.yaml b/.github/labeler.yaml index 339cb5b45e..bb31fff87b 100644 --- a/.github/labeler.yaml +++ b/.github/labeler.yaml @@ -1,13 +1,24 @@ --- +# Area area/ansible: - - "ansible/**/*" + - changed-files: + - any-glob-to-any-file: ansible/**/* area/github: - - ".github/**/*" -area/hack: - - "hack/**/*" + - changed-files: + - any-glob-to-any-file: .github/**/* area/kubernetes: - - "kubernetes/**/*" + - changed-files: + - any-glob-to-any-file: kubernetes/**/* +area/taskfile: + - changed-files: + - any-glob-to-any-file: .taskfiles/**/* + - any-glob-to-any-file: Taskfile* area/terraform: - - "terraform/**/*" + - changed-files: + - any-glob-to-any-file: terraform/**/* area/talos: - - "talos/**/*" + - changed-files: + - any-glob-to-any-file: talos/**/* +area/hack: + - changed-files: + - any-glob-to-any-file: hack/**/* diff --git a/.github/labels.yaml b/.github/labels.yaml index a91c77ca45..889340bd16 100644 --- a/.github/labels.yaml +++ b/.github/labels.yaml @@ -20,6 +20,10 @@ color: "72ccf3" description: >- Changes made in the terraform directory +- name: area/talos + color: "72ccf3" + description: >- + Changes made in the talos directory # Renovate - name: renovate/container color: "ffc300" diff --git a/.github/workflows/meta-labeler.yaml b/.github/workflows/meta-labeler.yaml index bd0e10aa4b..581956d617 100644 --- a/.github/workflows/meta-labeler.yaml +++ b/.github/workflows/meta-labeler.yaml @@ -3,23 +3,27 @@ name: "Meta Labeler" on: workflow_dispatch: - pull_request: + pull_request_target: branches: ["main"] + types: ["opened", "synchronize"] jobs: labeler: name: Labeler runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Generate Token - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 - id: generate-token + uses: actions/create-github-app-token@2986852ad836768dfea7781f31828eb3e17990fa # v1.6.2 + id: app-token with: - app_id: "${{ secrets.BOT_APP_ID }}" - private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" + app-id: "${{ secrets.BOT_APP_ID }}" + private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" - name: Labeler uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: configuration-path: .github/labeler.yaml - repo-token: "${{ steps.generate-token.outputs.token }}" + repo-token: "${{ steps.app-token.outputs.token }}"