Private
Public Access
1
0

[gtk] build: manual auth

This commit is contained in:
2026-04-12 17:44:06 -07:00
parent f9798a41e9
commit 89beb3ff2c

View File

@@ -100,10 +100,8 @@ jobs:
- name: Upload RPMs to Gitea package registry
env:
GITEA_ACTOR: ${{ gitea.actor }}
GITEA_SERVER_URL: ${{ gitea.server_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_REPOSITORY_OWNER: ${{ gitea.repository_owner }}
RPM_PACKAGE_GROUP: ${{ env.RPM_PACKAGE_GROUP }}
RPM_PACKAGE_TOKEN: ${{ secrets.RPM_PACKAGE_TOKEN }}
RPM_PACKAGE_USERNAME: ${{ vars.RPM_PACKAGE_USERNAME }}
@@ -111,23 +109,23 @@ jobs:
run: |
set -eu
owner="${GITEA_REPOSITORY%%/*}"
package_user="${RPM_PACKAGE_USERNAME:-${GITEA_ACTOR:-}}"
token="${RPM_PACKAGE_TOKEN:-${GITEA_TOKEN:-}}"
owner="${GITEA_REPOSITORY_OWNER}"
package_user="${RPM_PACKAGE_USERNAME:-}"
token="${RPM_PACKAGE_TOKEN:-}"
group="${RPM_PACKAGE_GROUP:-}"
if [ -z "$owner" ] || [ "$owner" = "$GITEA_REPOSITORY" ]; then
echo "Could not determine package owner from repository: $GITEA_REPOSITORY" >&2
if [ -z "$owner" ]; then
echo "Could not determine package owner from workflow context." >&2
exit 1
fi
if [ -z "$package_user" ]; then
echo "Missing package upload username. Set RPM_PACKAGE_USERNAME or ensure gitea.actor is available." >&2
echo "Missing package upload username. Set repository or organization variable RPM_PACKAGE_USERNAME." >&2
exit 1
fi
if [ -z "$token" ]; then
echo "Missing upload token. Set RPM_PACKAGE_TOKEN or ensure secrets.GITEA_TOKEN is available." >&2
echo "Missing package upload token. Set repository or organization secret RPM_PACKAGE_TOKEN." >&2
exit 1
fi