diff --git a/.gitea/workflows/gtk-rpm-release.yaml b/.gitea/workflows/gtk-rpm-release.yaml index e405ee8..17b4fa6 100644 --- a/.gitea/workflows/gtk-rpm-release.yaml +++ b/.gitea/workflows/gtk-rpm-release.yaml @@ -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