forked from conda/conda-build
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.65 KB
/
labels.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
name: Sync Labels
on:
# NOTE: github.event is workflow_dispatch payload:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
workflow_dispatch:
inputs:
delete-unmapped:
description: Delete labels not mapped in either global or local label configurations.
default: false
type: boolean
dry-run:
description: Run label synchronization workflow without making any changes.
default: false
type: boolean
jobs:
sync:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
env:
GLOBAL: https://raw.githubusercontent.com/conda/infra/main/.github/global.yml
LOCAL: .github/labels.yml
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- id: has_local
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with:
files: ${{ env.LOCAL }}
- name: Global Only
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
if: steps.has_local.outputs.files_exists == 'false'
with:
config-file: ${{ env.GLOBAL }}
delete-other-labels: ${{ inputs.delete-unmapped }}
dry-run: ${{ inputs.dry-run }}
- name: Global & Local
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
if: steps.has_local.outputs.files_exists == 'true'
with:
config-file: |
${{ env.GLOBAL }}
${{ env.LOCAL }}
delete-other-labels: ${{ inputs.delete-unmapped }}
dry-run: ${{ inputs.dry-run }}