Skip to content

Commit

Permalink
Properly sort staging/* refs to get latest branch (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
peb-adr authored May 17, 2024
1 parent 38acb67 commit a1f11c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pick-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Fetch and checkout latest staging branch
run: |
branch=$(git ls-remote --heads origin 'staging*' | tail -1 | awk 'gsub(".*refs/heads/","")')
branch=$(git ls-remote --heads origin 'staging/*' | awk 'gsub(".*refs/heads/","")' | sort -V | tail -1)
git fetch origin $branch
git checkout $branch
Expand Down

0 comments on commit a1f11c6

Please sign in to comment.