Changed so action publishes to repository owner
This commit is contained in:
19
action.yml
19
action.yml
@@ -28,16 +28,11 @@ runs:
|
|||||||
mkdir -p ./rpmbuild/{RPMS,SPECS}
|
mkdir -p ./rpmbuild/{RPMS,SPECS}
|
||||||
cp ${SPEC_FILE_PATH} ./rpmbuild/SPECS
|
cp ${SPEC_FILE_PATH} ./rpmbuild/SPECS
|
||||||
|
|
||||||
- name: Build and Upload RPM
|
- name: Build RPM
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
SPEC_FILE_PATH: ${{ inputs.spec-file-path }}
|
SPEC_FILE_PATH: ${{ inputs.spec-file-path }}
|
||||||
ACTION_ROOT: ${{ gitea.action_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: |
|
run: |
|
||||||
SPEC_FILE_NAME=$(basename ${SPEC_FILE_PATH})
|
SPEC_FILE_NAME=$(basename ${SPEC_FILE_PATH})
|
||||||
podman run --rm \
|
podman run --rm \
|
||||||
@@ -46,8 +41,18 @@ runs:
|
|||||||
-w /root \
|
-w /root \
|
||||||
fedora:latest \
|
fedora:latest \
|
||||||
/root/entrypoint.sh /root/rpmbuild/SPECS/${SPEC_FILE_NAME}
|
/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 \
|
find ./rpmbuild/RPMS/ -name "*.rpm" -type f \
|
||||||
-exec curl \
|
-exec curl \
|
||||||
--user ${UPLOAD_USER}:${UPLOAD_USER_TOKEN} \
|
--user ${UPLOAD_USER}:${UPLOAD_USER_TOKEN} \
|
||||||
--upload-file {} \
|
--upload-file {} \
|
||||||
${REPOSITORY_URL}/api/packages/${GITEA_ACTOR}/rpm/${PACKAGE_GROUP}/upload \;
|
${REPOSITORY_URL}/api/packages/${REPOSITORY_OWNER}/rpm/${PACKAGE_GROUP}/upload \;
|
||||||
|
|||||||
Reference in New Issue
Block a user