-
-
Notifications
You must be signed in to change notification settings - Fork 13
35 lines (31 loc) · 1000 Bytes
/
label-sync.yaml
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
---
name: Label Sync
on:
workflow_dispatch:
push:
branches: ["master"]
paths: [".github/labels.yaml"]
schedule:
- cron: "0 0 * * *" # Every day at midnight
jobs:
labels:
name: Sync Labels
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: actions/create-github-app-token@a0de6af83968303c8c955486bf9739a57d23c7f1 # v1.10.0
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
sparse-checkout: .github/labels.yaml
token: "${{ steps.app-token.outputs.token }}"
- name: Sync Labels
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
with:
config-file: .github/labels.yaml
token: "${{ steps.app-token.outputs.token }}"
delete-other-labels: true