-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (46 loc) · 1.87 KB
/
pr-labeler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md
name: Pull Request Labeler
on:
pull_request:
types: [opened, edited, synchronize, reopened]
schedule:
- cron: '0 */12 * * *'
# cancel the current workflow if another commit was pushed on the same PR or reference
# uses the GitHub workflow name to avoid collision with other workflows running on the same PR/reference
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
original-labeler:
# reference: https://github.com/actions/labeler
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
with:
configuration-path: .github/labeler-files.yml
repo-token: "${{ secrets.GITHUB_TOKEN }}"
extended-labeler:
# reference: https://github.com/ilyam8/periodic-pr-labeler
runs-on: ubuntu-latest
steps:
- uses: docker://docker.io/ilyam8/periodic-pr-labeler:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
LABEL_MAPPINGS_FILE: .github/labeler-files.yml
wip:
# reference: https://github.com/wip/action
# mark PRs with following keywords in the title: wip, work in progress, :construction:
# blocks merge of these branches using requirement:
# [Settings > Branch > master > Protect matching branches > Require > check status with "WIP (action)"]
if: ${{ github.event_name == 'pull_request' }} # WIP only works during PRs
runs-on: ubuntu-latest
steps:
- uses: wip/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}