Merge building and uploading into one step
This commit is contained in:
17
action.yml
17
action.yml
@@ -28,11 +28,16 @@ runs:
|
||||
mkdir -p ./rpmbuild/{RPMS,SPECS}
|
||||
cp ${SPEC_FILE_PATH} ./rpmbuild/SPECS
|
||||
|
||||
- name: Build RPM
|
||||
- name: Build and Upload 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 \
|
||||
@@ -41,16 +46,6 @@ 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 }}
|
||||
GITEA_ACTOR: ${{ gitea.actor }}
|
||||
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} \
|
||||
|
||||
Reference in New Issue
Block a user