github: actions: Use on-PR labeler

Now that the standard GitHub action supports forks, switch to the on-PR
action instead of running a cronjob.

Reference:

https://github.com/actions/labeler/issues/12#issuecomment-670967607

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2020-09-08 11:54:03 +02:00 committed by Anas Nashif
commit bbcda199bf
2 changed files with 11 additions and 13 deletions

11
.github/workflows/labeler.yml vendored Normal file
View file

@ -0,0 +1,11 @@
name: 'Pull Request Labeler'
on:
- pull_request_target
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2.1.1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'

View file

@ -1,13 +0,0 @@
name: Pull request labeler
on:
schedule:
- cron: '*/5 * * * *'
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- uses: paulfantom/periodic-labeler@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
LABEL_MAPPINGS_FILE: .github/labeler.yml