Skip to content

Commit dac0d68

Browse files
committed
[install] in archiver.yml get the repo owner from the triggering tag as github.repository seems to give an empty owner
1 parent 0c86da2 commit dac0d68

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/archiver.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,20 @@ jobs:
6060
run: |
6161
echo "Current directory is $(pwd)"
6262
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}"
6863
githubref=$${{ github.ref }}
6964
echo "(From github.ref) githubref = ${githubref}"
7065
tagname=${githubref#/tags/}
7166
echo "(From github.ref) tagname = ${tagname}"
7267
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}"
7377
# Check version tag
7478
cudacpp_version=$(cat ${WORKDIR}/VERSION.txt | awk '/^cudacpp_version/{print $3}')
7579
mg5_version=$(cat ${WORKDIR}/VERSION.txt | awk '/^mg5_version_current/{print $3}')
@@ -82,13 +86,12 @@ jobs:
8286
exit 1 # this will cause the job to fail without running the next steps
8387
fi
8488
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
8690
echo "ERROR! Invalid tagname '${tagname}' (valid format is '${tagname_version}[_txt]' where txt only contains letters or digits)"
8791
exit 1 # this will cause the job to fail without running the next steps
8892
fi
8993
echo "OK! Tagname '${tagname}' respects the expected format"
9094
tagname_latest=${TAGPREFIX}${mg5_version}_latest
91-
echo "(From TAGPREFIX) tagname_latest = ${tagname_latest}"
9295
echo "TAGNAME_LATEST=${tagname_latest}" >> $GITHUB_ENV
9396
# Update VERSION.txt
9497
echo "" >> ${WORKDIR}/VERSION.txt

0 commit comments

Comments
 (0)