-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
34 lines (34 loc) · 1.18 KB
/
action.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
name: 'DEVs Dungeon labels Action'
description: 'Import open source issue labels standards'
inputs:
github-token:
description: 'GitHub token for repo'
required: true
owner-name:
description: 'Owner name is user or organisation'
required: true
repository-name:
description: 'GitHub repo name'
required: true
force:
description: 'Clear existing labels first'
default: true
runs:
using: "composite"
steps:
- name: 'install dependency'
run: npm install github-label-template
shell: bash
- name: 'delete existing labels'
run: |
[[ ${{ inputs.force }} = true ]] && npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ inputs.github-token }} -d
if [ -z "${{ inputs.force }}" ]
then
npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ inputs.github-token }} -d
else
echo -e "Existing labels not removed"
fi
shell: bash
- name: 'import labels from json file'
run: npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ inputs.github-token }} -i ${{ github.action_path }}/labels.json
shell: bash