Skip to content

Commit

Permalink
use actions/labeler Action instead of add-labels workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shota-kitazawa committed May 5, 2024
1 parent 44c3d47 commit 45c0d5d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 54 deletions.
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reviewapps:
- changed-files:
- all-globs-to-any-file:
- '!.github/**/*.yml'
- '!**/*.md'
54 changes: 0 additions & 54 deletions .github/workflows/add-labels.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: add labels for some cases

on: pull_request

jobs:
labeler:
runs-on: ubuntu-latest # windows-latest | macos-latest
if: ${{ ! startsWith(github.head_ref, 'renovate/') }}
steps:
# to trigger other Actions caused by adding reviewapp Label
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- id: label-the-PR
uses: actions/labeler@v5
with:
repo-token: ${{ steps.generate_token.outputs.token }}

0 comments on commit 45c0d5d

Please sign in to comment.