ci: Overwrite REPO_PATH based on the value of $NIGHTLY

Override only for osbuild-composer, not other projects

will produce different repositories/rpms for the same commit when
executed from a PR and from the scheduled pipelines. We need the
distinction b/c osbuild-composer-tests RPMs end up slightly different in
these two cases. For more info see:
https://github.com/osbuild/osbuild-composer/pull/2093#pullrequestreview-854328838
https://github.com/osbuild/osbuild-composer/pull/2093#issuecomment-1014469915
This commit is contained in:
Alexander Todorov 2022-01-18 13:22:07 +02:00 committed by Sanne Raymaekers
parent 43738d6caa
commit b31f61649a
2 changed files with 10 additions and 1 deletions

View file

@ -38,6 +38,9 @@ fi
# Relative path of the repository used for constructing both the local and
# remote paths below, so that they're consistent.
REPO_PATH=osbuild-composer/${DISTRO_VERSION}/${ARCH}/${COMMIT}
if [ "${NIGHTLY:=false}" == "true" ]; then
REPO_PATH=nightly/${REPO_PATH}
fi
# Directory to hold the RPMs temporarily before we upload them.
REPO_DIR=repo/${REPO_PATH}