[gtk] build: manual auth
This commit is contained in:
@@ -100,10 +100,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload RPMs to Gitea package registry
|
- name: Upload RPMs to Gitea package registry
|
||||||
env:
|
env:
|
||||||
GITEA_ACTOR: ${{ gitea.actor }}
|
|
||||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
GITEA_REPOSITORY_OWNER: ${{ gitea.repository_owner }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
RPM_PACKAGE_GROUP: ${{ env.RPM_PACKAGE_GROUP }}
|
RPM_PACKAGE_GROUP: ${{ env.RPM_PACKAGE_GROUP }}
|
||||||
RPM_PACKAGE_TOKEN: ${{ secrets.RPM_PACKAGE_TOKEN }}
|
RPM_PACKAGE_TOKEN: ${{ secrets.RPM_PACKAGE_TOKEN }}
|
||||||
RPM_PACKAGE_USERNAME: ${{ vars.RPM_PACKAGE_USERNAME }}
|
RPM_PACKAGE_USERNAME: ${{ vars.RPM_PACKAGE_USERNAME }}
|
||||||
@@ -111,23 +109,23 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
owner="${GITEA_REPOSITORY%%/*}"
|
owner="${GITEA_REPOSITORY_OWNER}"
|
||||||
package_user="${RPM_PACKAGE_USERNAME:-${GITEA_ACTOR:-}}"
|
package_user="${RPM_PACKAGE_USERNAME:-}"
|
||||||
token="${RPM_PACKAGE_TOKEN:-${GITEA_TOKEN:-}}"
|
token="${RPM_PACKAGE_TOKEN:-}"
|
||||||
group="${RPM_PACKAGE_GROUP:-}"
|
group="${RPM_PACKAGE_GROUP:-}"
|
||||||
|
|
||||||
if [ -z "$owner" ] || [ "$owner" = "$GITEA_REPOSITORY" ]; then
|
if [ -z "$owner" ]; then
|
||||||
echo "Could not determine package owner from repository: $GITEA_REPOSITORY" >&2
|
echo "Could not determine package owner from workflow context." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$package_user" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$token" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user