We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 992cd91 + caab363 commit 2820397Copy full SHA for 2820397
.github/workflows/fork-sync-reusable.yml
@@ -33,7 +33,15 @@ jobs:
33
id: lookup-most-recent-release-branch
34
run: |
35
git fetch --all --tags
36
- most_recent_release_branch=$(git branch --remotes --sort refname | grep network-operator- | tail -n 1 | cut -d '/' -f 2-) # example: network-operator-25.10.x
+ most_recent_release_branch=$(
37
+ git branch -r \
38
+ | grep 'network-operator-[0-9]*\.[0-9]*\.x' \
39
+ | sed 's#.*/##' \
40
+ | sed 's/network-operator-//' \
41
+ | sort -V \
42
+ | tail -n 1 \
43
+ | xargs -I{} echo "network-operator-{}"
44
+ )
45
echo most_recent_release_branch=$most_recent_release_branch | tee -a $GITHUB_OUTPUT
46
47
most_recent_release_branch_major_minor=$(echo $most_recent_release_branch | cut -d '-' -f 3 | sed 's/.x//') # example: 25.10
0 commit comments