forked from conda/conda-build
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.33 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
---
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:
dryrun:
description: 'dryrun: Preview changes to labels without editing them (true|false)'
required: true
type: boolean
default: true
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@v3
- id: has_local
uses: andstor/[email protected]
with:
files: ${{ env.LOCAL }}
- name: Global Only
uses: EndBug/[email protected]
if: steps.has_local.outputs.files_exists == 'false'
with:
config-file: ${{ env.GLOBAL }}
delete-other-labels: true
dry-run: ${{ github.event.inputs.dryrun }}
- name: Global & Local
uses: EndBug/[email protected]
if: steps.has_local.outputs.files_exists == 'true'
with:
config-file: |
${{ env.GLOBAL }}
${{ env.LOCAL }}
delete-other-labels: true
dry-run: ${{ github.event.inputs.dryrun }}