Skip to content

Commit bcfc5e7

Browse files
Create action.yml
1 parent bc41611 commit bcfc5e7

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

action.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'Drive-for-Java labels Action'
2+
description: 'Import open source issue labels standards'
3+
inputs:
4+
github-token:
5+
description: 'GitHub token for repo'
6+
required: true
7+
owner-name:
8+
description: 'Owner name is user or organisation'
9+
required: true
10+
repository-name:
11+
description: 'GitHub repo name'
12+
required: true
13+
force:
14+
description: 'Clear existing labels first'
15+
default: true
16+
runs:
17+
using: "composite"
18+
steps:
19+
- name: 'install dependency'
20+
run: npm install github-label-template
21+
shell: bash
22+
- name: 'delete existing labels'
23+
run: |
24+
[[ ${{ inputs.force }} = true ]] && npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ inputs.github-token }} -d
25+
if [ -z "${{ inputs.force }}" ]
26+
then
27+
npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ inputs.github-token }} -d
28+
else
29+
echo -e "Existing labels not removed"
30+
fi
31+
shell: bash
32+
- name: 'import labels from json file'
33+
run: npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ inputs.github-token }} -i ${{ github.action_path }}/labels.json
34+
shell: bash

0 commit comments

Comments
 (0)