Skip to content

Commit 5f8a792

Browse files
authored
fix: use git ls-remote to detect stable branches
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
1 parent d3577e2 commit 5f8a792

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/generate-top-index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Get stable branches
2929
id: branch
3030
run: |
31-
branches=$(git branch -r | grep -E 'origin/stable[0-9]+' | sed 's/.*stable//' | sort -n -r | tr '\n' ' ')
31+
branches=$(git ls-remote --heads origin "heads/stable[0-9][0-9]"| awk '{gsub(/^refs\/heads\/stable/, "", $2); print $2}' | sort -n -r | tr '\n' ' ')
3232
echo "branches=$branches" >> $GITHUB_OUTPUT
3333
3434
- name: Setup php

0 commit comments

Comments
 (0)