Skip to content

Commit a1f11c6

Browse files
authored
Properly sort staging/* refs to get latest branch (#246)
1 parent 38acb67 commit a1f11c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/pick-to-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Fetch and checkout latest staging branch
2727
run: |
28-
branch=$(git ls-remote --heads origin 'staging*' | tail -1 | awk 'gsub(".*refs/heads/","")')
28+
branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1)
2929
git fetch origin $branch
3030
git checkout $branch
3131

0 commit comments

Comments
 (0)