forked from projectcontour/contour
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 968 Bytes
/
sync-labels.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
# This workflow runs the sync-repo-labels.sh script periodically.
name: Sync GitHub Labels
on:
# Run every day at 10:00 (until #2485 is fixed).
schedule:
- cron: '0 10 * * *'
# Run when a PR that touched the labels is closed (closed includes merges).
pull_request:
types: [closed]
paths:
- "site/_data/github-labels.yaml"
# Allow manual runs
workflow_dispatch:
jobs:
sync:
name: Sync Labels
runs-on: ubuntu-latest
steps:
# Note, we check out main. We don't want un-merged PRs to whack
# labels globally.
- name: Check out main
uses: actions/checkout@v3
with:
ref: main
# We need this token in a file so the syncer can consume it from
# within the Docker container.
- name: Export the GitHub token
run: 'echo "${{ secrets.PROJECTCONTOUR_BOT_GITHUB_TOKEN }}" > github-token'
- name: Run the label syncer
run: 'TOKEN="github-token" ./hack/release/sync-repo-labels.sh'