@@ -60,16 +60,20 @@ jobs:
60
60
run : |
61
61
echo "Current directory is $(pwd)"
62
62
echo "WORKDIR is ${WORKDIR}"
63
- OWNER=$${{ github.repository_owner }}
64
- echo "OWNER is ${OWNER}"
65
- TAGPREFIX=cudacpp_for
66
- if [ "${OWNER}" != "madgraph5" ]; then TAGPREFIX="${OWNER}_${TAGPREFIX}"; fi # TEMPORARY! this will change eventually...
67
- echo "TAGPREFIX is ${TAGPREFIX}"
68
63
githubref=$${{ github.ref }}
69
64
echo "(From github.ref) githubref = ${githubref}"
70
65
tagname=${githubref#/tags/}
71
66
echo "(From github.ref) tagname = ${tagname}"
72
67
echo "TAGNAME=${tagname}" >> $GITHUB_ENV
68
+ ###REPO=$${{ github.repository }}
69
+ ###echo "REPO is ${REPO}" # owner is empty???
70
+ ###OWNER=${REPO%/*}
71
+ ###echo "OWNER is ${OWNER}" # owner is empty???
72
+ ###TAGPREFIX=cudacpp_for
73
+ ###if [ "${OWNER}" != "madgraph5" ]; then TAGPREFIX="${OWNER}_${TAGPREFIX}"; fi # TEMPORARY! this will change eventually...
74
+ tmpsuffix=${tagname#*cudacpp_for}
75
+ TAGPREFIX=${tagname/${tmpsuffix}} # determine TAGPREFIX from triggering tag because github.repository_owner is empty(???)
76
+ echo "TAGPREFIX is ${TAGPREFIX}"
73
77
# Check version tag
74
78
cudacpp_version=$(cat ${WORKDIR}/VERSION.txt | awk '/^cudacpp_version/{print $3}')
75
79
mg5_version=$(cat ${WORKDIR}/VERSION.txt | awk '/^mg5_version_current/{print $3}')
@@ -82,13 +86,12 @@ jobs:
82
86
exit 1 # this will cause the job to fail without running the next steps
83
87
fi
84
88
tagname_suffix="${tagname/${tagname_version}}"
85
- if [ `python3 -c "import re; print(re.match('(|_[0-9a-z]+)$','${tagsuffix }') is not None)"` == "False" ]; then
89
+ if [ `python3 -c "import re; print(re.match('(|_[0-9a-z]+)$','${tagname_suffix }') is not None)"` == "False" ]; then
86
90
echo "ERROR! Invalid tagname '${tagname}' (valid format is '${tagname_version}[_txt]' where txt only contains letters or digits)"
87
91
exit 1 # this will cause the job to fail without running the next steps
88
92
fi
89
93
echo "OK! Tagname '${tagname}' respects the expected format"
90
94
tagname_latest=${TAGPREFIX}${mg5_version}_latest
91
- echo "(From TAGPREFIX) tagname_latest = ${tagname_latest}"
92
95
echo "TAGNAME_LATEST=${tagname_latest}" >> $GITHUB_ENV
93
96
# Update VERSION.txt
94
97
echo "" >> ${WORKDIR}/VERSION.txt
0 commit comments