Skip to content

Commit

Permalink
Properly sort staging/* refs to get latest branch
Browse files Browse the repository at this point in the history
  • Loading branch information
peb-adr committed May 17, 2024
1 parent c70aab5 commit 3c18572
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 3c18572

Please sign in to comment.