packit: Use upstream repo as fallback

When we publish our packages we currently use the
`PACKIT_DOWNSTREAM_REPO` envvar. This is not defined when we are
publishing to Copr and instead we should use `PACKIT_UPSTREAM_REPO`
envvar.

Changing it to use downstream repo by default and fallback to upstream
repo fixes this issue.

Fixes: https://github.com/cockpit-project/cockpit/issues/22883
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
This commit is contained in:
Freya Gustavsson 2026-03-17 14:46:43 +01:00 committed by Jelle van der Waa
parent 00b979d9f2
commit f08f4bbfec

View file

@ -99,8 +99,8 @@ jobs:
bash -exc '
# for debugging of official runs, CLI is different from packit service
env | grep PACKIT
tar -xJf "${PACKIT_DOWNSTREAM_REPO}/cockpit-${PACKIT_PROJECT_VERSION}.tar.xz" "cockpit-*/runtime-npm-modules.txt" --strip-components=1
tools/fix-spec "${PACKIT_DOWNSTREAM_REPO}/cockpit.spec" "${PACKIT_PROJECT_VERSION}"
tar -xJf "${PACKIT_DOWNSTREAM_REPO:-${PACKIT_UPSTREAM_REPO}}/cockpit-${PACKIT_PROJECT_VERSION}.tar.xz" "cockpit-*/runtime-npm-modules.txt" --strip-components=1
tools/fix-spec "${PACKIT_DOWNSTREAM_REPO:-${PACKIT_UPSTREAM_REPO}}/cockpit.spec" "${PACKIT_PROJECT_VERSION}"
'
- job: propose_downstream