File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -18,21 +18,24 @@ jobs:
18
18
git config --global user.name "github-actions[bot]"
19
19
git config --global user.email "github-actions[bot]@users.noreply.github.com"
20
20
21
- - name : Ensure "automation" label exists
21
+ - name : Ensure "automation" label exists (or update it)
22
22
run : |
23
- echo "Checking for existing label..."
24
- LABEL_LIST=$(gh label list --json name --jq '.[].name' || echo "")
25
- echo "Labels found: $LABEL_LIST"
26
-
27
- if echo "$LABEL_LIST" | grep -qx "automation"; then
28
- echo "Label 'automation' already exists. Skipping creation."
23
+ if gh label view automation --json name >/dev/null 2>&1; then
24
+ echo "Label 'automation' already exists. Updating it..."
25
+ gh label edit automation \
26
+ --color "0e8a16" \
27
+ --description "Automatically created for syncing branches" \
28
+ --force
29
29
else
30
- echo "Creating label 'automation'..."
31
- gh label create automation --color "0e8a16" --description "Automatically created for syncing branches"
30
+ echo "Label 'automation' does not exist. Creating it..."
31
+ gh label create automation \
32
+ --color "0e8a16" \
33
+ --description "Automatically created for syncing branches"
32
34
fi
33
35
env :
34
36
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
37
38
+
36
39
- name : Fetch all branches
37
40
run : git fetch origin importer-rework
38
41
You can’t perform that action at this time.
0 commit comments