-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
57 lines (50 loc) · 1.65 KB
/
Copy pathaction.yml
File metadata and controls
57 lines (50 loc) · 1.65 KB
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
50
51
52
53
54
55
56
57
---
name: "Labelflair"
description: "Generate a colorful palette of labels for your GitHub Issues"
branding:
color: "blue"
icon: "bookmark"
inputs:
config-file:
description: "Path to the labelflair.toml configuration file"
default: ".github/labelflair.toml"
delete-other-labels:
description: "Whether to delete labels not defined in the config file"
default: "false"
dry-run:
description: "Whether to only print the labels, but not apply them to GitHub"
default: "false"
version:
description: "Version of labelflair-cli to use"
default: "0.3.0"
runs:
using: "composite"
steps:
- name: "Verify version tag format"
run: |
# Ensure the version is in the format X.Y.Z
if [[ ! "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Version must be in the format X.Y.Z (e.g., 0.3.0)"
exit 1
fi
shell: bash
env:
VERSION: ${{ inputs.version }}
- name: "Install labelflair-cli"
run: |
# Install the Labelflair CLI
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/jdno/labelflair/releases/download/v${VERSION}/labelflair-cli-installer.sh | sh
shell: bash
env:
VERSION: ${{ inputs.version }}
- name: "Generate labels"
run: "labelflair generate --config ${CONFIG_FILE}"
shell: bash
env:
CONFIG_FILE: ${{ inputs.config-file }}
- name: "Sync labels"
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # 2.3.3
with:
config-file: "./labels.yml"
delete-other-labels: ${{ inputs.delete-other-labels }}
dry-run: ${{ inputs.dry-run }}