Skip to content

Commit b90e9a1

Browse files
Update branch name extraction for tag builds (#972)
* Update branch name logic for tag builds to handle leading whitespace * Add fetch for release branches
1 parent cb431a8 commit b90e9a1

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

.github/workflows/datasets.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
branch=main
3333
if [[ $ref_type == "tag"* ]]
3434
then
35-
raw=$(git branch -r --contains ${{ github.ref_name }})
36-
branch=${raw/origin\/}
35+
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
36+
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
3737
fi
3838
pip install "pandas>=1.2.0,<1.4.0dev0"
3939
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$branch"

.github/workflows/implicit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
branch=main
3333
if [[ $ref_type == "tag"* ]]
3434
then
35-
raw=$(git branch -r --contains ${{ github.ref_name }})
36-
branch=${raw/origin\/}
35+
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
36+
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
3737
fi
3838
pip install "pandas>=1.2.0,<1.4.0dev0"
3939
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$branch"

.github/workflows/lightfm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
branch=main
3333
if [[ $ref_type == "tag"* ]]
3434
then
35-
raw=$(git branch -r --contains ${{ github.ref_name }})
36-
branch=${raw/origin\/}
35+
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
36+
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
3737
fi
3838
pip install "pandas>=1.2.0,<1.4.0dev0"
3939
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$branch"

.github/workflows/pytorch.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: pytorch
23

34
on:
@@ -32,8 +33,8 @@ jobs:
3233
branch=main
3334
if [[ $ref_type == "tag"* ]]
3435
then
35-
raw=$(git branch -r --contains ${{ github.ref_name }})
36-
branch=${raw/origin\/}
36+
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
37+
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
3738
fi
3839
pip install "pandas>=1.2.0,<1.4.0dev0"
3940
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$branch"

.github/workflows/tensorflow.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
branch=main
3939
if [[ $ref_type == "tag"* ]]
4040
then
41-
raw=$(git branch -r --contains ${{ github.ref_name }})
42-
branch=${raw/origin\/}
41+
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
42+
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
4343
fi
4444
pip install "pandas>=1.2.0,<1.4.0dev0"
4545
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$branch"
@@ -93,8 +93,8 @@ jobs:
9393
branch=main
9494
if [[ $ref_type == "tag"* ]]
9595
then
96-
raw=$(git branch -r --contains ${{ github.ref_name }})
97-
branch=${raw/origin\/}
96+
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
97+
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
9898
fi
9999
pip install "pandas>=1.2.0,<1.4.0dev0"
100100
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$branch"

.github/workflows/xgboost.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
branch=main
3333
if [[ $ref_type == "tag"* ]]
3434
then
35-
raw=$(git branch -r --contains ${{ github.ref_name }})
36-
branch=${raw/origin\/}
35+
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release*
36+
branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///')
3737
fi
3838
pip install "pandas>=1.2.0,<1.4.0dev0"
3939
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$branch"

0 commit comments

Comments
 (0)