Changed so action publishes to repository owner

This commit is contained in:
2025-11-30 22:03:55 -05:00
parent 9ab81474ec
commit 7041c5f4ad

View File

@@ -28,16 +28,11 @@ runs:
mkdir -p ./rpmbuild/{RPMS,SPECS}
cp ${SPEC_FILE_PATH} ./rpmbuild/SPECS
- name: Build and Upload RPM
- name: Build RPM
shell: bash
env:
SPEC_FILE_PATH: ${{ inputs.spec-file-path }}
ACTION_ROOT: ${{ gitea.action_path }}
REPOSITORY_URL: ${{ inputs.repository-url }}
PACKAGE_GROUP: ${{ inputs.package-group }}
GITEA_ACTOR: ${{ gitea.actor }}
UPLOAD_USER: ${{ inputs.repository-user }}
UPLOAD_USER_TOKEN: ${{ inputs.repository-user-token }}
run: |
SPEC_FILE_NAME=$(basename ${SPEC_FILE_PATH})
podman run --rm \
@@ -46,8 +41,18 @@ runs:
-w /root \
fedora:latest \
/root/entrypoint.sh /root/rpmbuild/SPECS/${SPEC_FILE_NAME}
- name: Upload package
shell: bash
env:
REPOSITORY_URL: ${{ inputs.repository-url }}
PACKAGE_GROUP: ${{ inputs.package-group }}
REPOSITORY_OWNER: ${{ gitea.repository_owner }}
UPLOAD_USER: ${{ inputs.repository-user }}
UPLOAD_USER_TOKEN: ${{ inputs.repository-user-token }}
run: |
find ./rpmbuild/RPMS/ -name "*.rpm" -type f \
-exec curl \
--user ${UPLOAD_USER}:${UPLOAD_USER_TOKEN} \
--upload-file {} \
${REPOSITORY_URL}/api/packages/${GITEA_ACTOR}/rpm/${PACKAGE_GROUP}/upload \;
${REPOSITORY_URL}/api/packages/${REPOSITORY_OWNER}/rpm/${PACKAGE_GROUP}/upload \;