Skip to content

Commit 240f791

Browse files
authored
Merge pull request #3386 from tpurschke/develop
Develop
2 parents ca26b6f + 6c39786 commit 240f791

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/auto-sync-develop-to-importer-rework.yml.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,24 @@ jobs:
1818
git config --global user.name "github-actions[bot]"
1919
git config --global user.email "github-actions[bot]@users.noreply.github.com"
2020
21-
- name: Ensure "automation" label exists
21+
- name: Ensure "automation" label exists (or update it)
2222
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
2929
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"
3234
fi
3335
env:
3436
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3537

38+
3639
- name: Fetch all branches
3740
run: git fetch origin importer-rework
3841

0 commit comments

Comments
 (0)