-
Notifications
You must be signed in to change notification settings - Fork 201
38 lines (32 loc) · 1.04 KB
/
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
name: 'PR Labeler'
on:
workflow_run:
workflows: ["save-pr-number-for-labeler"]
types:
- completed
permissions:
actions: read # for downloading artifacts
contents: read # for accessing repository contents
pull-requests: write # for add labels to pull requests
jobs:
label:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 5
steps:
- name: Download PR number
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
with:
name: pr_number
path: ./
run_id: ${{ github.event.workflow_run.id }}
- name: Read PR number
id: pr_number
run: echo "::set-output name=number::$(cat pr_number.txt)"
- name: Add label
run: gh pr edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ steps.pr_number.outputs.number }}
LABELS: type:iOS 🍎