Skip to content

Commit 72702fa

Browse files
authored
1 parent 2dbd0e0 commit 72702fa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

entrypoint.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Clean the branch name by replacing / with a .
44
function clean {
5-
local cleaned=`echo $1 | sed 's,/,.,g'`
5+
local cleaned=$(echo $1 | sed 's,/,.,g')
66
echo "$cleaned"
77
}
88

@@ -20,23 +20,23 @@ if [[ $var_to_use == refs/tags/* ]]
2020
then
2121
# These look something like refs/tags/<tag-name>. Extract <tag-name>.
2222
result="$(clean ${var_to_use/refs\/tags\//})"
23-
echo "::set-output name=tag::$result"
23+
echo "tag=$result" >> "$GITHUB_OUTPUT"
2424
elif [[ $var_to_use == refs/heads/* ]]
2525
then
26-
# These look something like refs/heads/<branch-name>. Extract <branch-name>.
26+
# These look something like refs/heads/<branch-name>. Extract <branch-name>.
2727
result="$(clean ${var_to_use/refs\/heads\//})"
28-
echo "::set-output name=tag::$result"
28+
echo "tag=$result" >> "$GITHUB_OUTPUT"
2929
elif [[ $var_to_use == refs/pull/* ]]
3030
then
3131
# These look something like refs/pull/<pr-number>/merge. Extract <pr-number>
3232
remove_front="${var_to_use/refs\/pull\//}"
3333
remove_back="${remove_front%/merge}"
3434
result="$(clean $remove_back)"
35-
echo "::set-output name=tag::pr-$result"
35+
echo "tag=pr-$result" >> "$GITHUB_OUTPUT"
3636
else
37-
# If it doesn't match one of those, it's just a vanilla ref. Make sure it's docker-compatible.
38-
result="$(clean $var_to_use)"
39-
echo "::set-output name=tag::$result"
37+
# If it doesn't match one of those, it's just a vanilla ref. Make sure it's docker-compatible.
38+
result="$(clean $var_to_use)"
39+
echo "tag=$result" >> "$GITHUB_OUTPUT"
4040
fi
4141

4242

0 commit comments

Comments
 (0)