2
2
3
3
# Clean the branch name by replacing / with a .
4
4
function clean {
5
- local cleaned=` echo $1 | sed ' s,/,.,g' `
5
+ local cleaned=$( echo $1 | sed ' s,/,.,g' )
6
6
echo " $cleaned "
7
7
}
8
8
@@ -20,23 +20,23 @@ if [[ $var_to_use == refs/tags/* ]]
20
20
then
21
21
# These look something like refs/tags/<tag-name>. Extract <tag-name>.
22
22
result=" $( clean ${var_to_use/ refs\/ tags\/ / } ) "
23
- echo " ::set-output name= tag:: $result "
23
+ echo " tag= $result " >> " $GITHUB_OUTPUT "
24
24
elif [[ $var_to_use == refs/heads/* ]]
25
25
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>.
27
27
result=" $( clean ${var_to_use/ refs\/ heads\/ / } ) "
28
- echo " ::set-output name= tag:: $result "
28
+ echo " tag= $result " >> " $GITHUB_OUTPUT "
29
29
elif [[ $var_to_use == refs/pull/* ]]
30
30
then
31
31
# These look something like refs/pull/<pr-number>/merge. Extract <pr-number>
32
32
remove_front=" ${var_to_use/ refs\/ pull\/ / } "
33
33
remove_back=" ${remove_front%/ merge} "
34
34
result=" $( clean $remove_back ) "
35
- echo " ::set-output name= tag:: pr-$result "
35
+ echo " tag= pr-$result " >> " $GITHUB_OUTPUT "
36
36
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 "
40
40
fi
41
41
42
42
0 commit comments