Skip to content

Commit c9a06de

Browse files
committed
fix: use latest release tag
1 parent 612e1b7 commit c9a06de

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/ci-check-for-new-release-tag.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
outputs:
66
continue_build:
77
value: ${{ jobs.check_release.outputs.continue_build }}
8+
iperf3_tag:
9+
value: ${{ jobs.check_release.outputs.iperf3_tag }}
810

911
env:
1012
GH_TOKEN: "${{ github.TOKEN }}"
@@ -13,6 +15,7 @@ jobs:
1315
check_release:
1416
outputs:
1517
continue_build: ${{ steps.continue_build_check.outputs.continue_build_choice }}
18+
iperf3_tag: ${{ steps.continue_build_check.outputs.iperf3_tag }}
1619
runs-on: ubuntu-24.04-arm
1720

1821
steps:
@@ -23,10 +26,10 @@ jobs:
2326
persist-credentials: false
2427

2528
- name: Get latest esnet/iperf tag
26-
run: printf '%s\n' "upstream_iperf3_tag=$(git ls-remote -q -t --refs "https://github.com/esnet/iperf.git" | awk '{sub("refs/tags/", "");sub("(.*)(-|rc|iperf|trunk|3.1b1|3.1b2|3.1b3)(.*)", ""); print $2 }' | awk '!/^$/' | sort -rV | head -n1)" >> $GITHUB_ENV
29+
run: printf '%s\n' "upstream_iperf3_tag=$(git ls-remote -q -t --refs "https://github.com/esnet/iperf.git" | awk '{sub("refs/tags/", ""); if ($2 ~ /^[0-9]+(\.[0-9]+)*$/) print $2 }' | sort -rV | awk '!/^$/' | head -n 1)" >> $GITHUB_ENV
2730

2831
- name: Get latest ${{ github.repository }} tag
29-
run: printf '%s\n' "local_iperf3_tag=$(git ls-remote -q -t --refs "https://github.com/${{ github.repository }}.git" | awk '{sub("refs/tags/", "");sub("(.*)(-|rc|iperf|trunk|3.1b1|3.1b2|3.1b3)(.*)", ""); print $2 }' | awk '!/^$/' | sort -rV | head -n1)" >> $GITHUB_ENV
32+
run: printf '%s\n' "local_iperf3_tag=$(git ls-remote -q -t --refs "https://github.com/${{ github.repository }}.git" | awk '{sub("refs/tags/", ""); if ($2 ~ /^[0-9]+(\.[0-9]+)*$/) print $2 }' | sort -rV | awk '!/^$/' | head -n 1)" >> $GITHUB_ENV
3033

3134
- name: Test values - latest upstream vs local tags
3235
id: continue_build_check
@@ -42,6 +45,7 @@ jobs:
4245
if [[ "$(ver "${{ env.upstream_iperf3_tag }}")" -gt "$(ver "${local_iperf3_tag//+/}")" ]]; then
4346
printf "%-14s remote:%-10s local:%-10s %s\n" "$iray" "${{ env.upstream_iperf3_tag }}" "${local_iperf3_tag//+/}" "< New version available - workflow will be triggered"
4447
printf '%s\n' "continue_build_choice=yes" >> $GITHUB_OUTPUT
48+
printf '%s\n' "iperf3_tag=${{ env.upstream_iperf3_tag }}" >> $GITHUB_OUTPUT
4549
else
4650
printf "%-14s remote:%-10s local:%-10s\n" "$iray" "${{ env.upstream_iperf3_tag }}" "${local_iperf3_tag//+/}"
4751
fi

.github/workflows/ci-main-reusable-caller.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
VT_API_KEY: ${{ secrets.VT_API_KEY || '' }}
160160
with:
161161
source_repo: ${{ needs.scheduled_defaults.outputs.source_repo }}
162-
source_branch: ${{ needs.scheduled_defaults.outputs.source_branch }}
162+
source_branch: ${{ needs.iperf3_tag.outputs.iperf3_tag || needs.scheduled_defaults.outputs.source_branch }}
163163

164164
linux_crossbuild:
165165
needs: [scheduled_defaults, iperf3_tag]
@@ -176,7 +176,7 @@ jobs:
176176
VT_API_KEY: ${{ secrets.VT_API_KEY || '' }}
177177
with:
178178
source_repo: ${{ needs.scheduled_defaults.outputs.source_repo }}
179-
source_branch: ${{ needs.scheduled_defaults.outputs.source_branch }}
179+
source_branch: ${{ needs.iperf3_tag.outputs.iperf3_tag || needs.scheduled_defaults.outputs.source_branch }}
180180

181181
windows:
182182
needs: [scheduled_defaults, iperf3_tag]
@@ -193,7 +193,7 @@ jobs:
193193
VT_API_KEY: ${{ secrets.VT_API_KEY || '' }}
194194
with:
195195
source_repo: ${{ needs.scheduled_defaults.outputs.source_repo }}
196-
source_branch: ${{ needs.scheduled_defaults.outputs.source_branch }}
196+
source_branch: ${{ needs.iperf3_tag.outputs.iperf3_tag || needs.scheduled_defaults.outputs.source_branch }}
197197
artifacts_only: ${{ needs.scheduled_defaults.outputs.artifacts_only }}
198198

199199
osx:
@@ -226,7 +226,7 @@ jobs:
226226
brew_install: ${{ matrix.brew_install }}
227227
target: ${{ matrix.target }}
228228
source_repo: ${{ needs.scheduled_defaults.outputs.source_repo }}
229-
source_branch: ${{ needs.scheduled_defaults.outputs.source_branch }}
229+
source_branch: ${{ needs.iperf3_tag.outputs.iperf3_tag || needs.scheduled_defaults.outputs.source_branch }}
230230
binary_filename: ${{ matrix.binary_filename }}
231231

232232
release:

0 commit comments

Comments
 (0)