Bring back the find exec call to upload packages
This commit is contained in:
25
action.yml
25
action.yml
@@ -69,24 +69,11 @@ runs:
|
||||
echo "Goal package to upload: ${PACKAGE_NAME}"
|
||||
RPM_PATH="./rpmbuild/RPMS/"
|
||||
echo "Searching in ${RPM_PATH}"
|
||||
ls ${RPM_PATH}
|
||||
find ./rpmbuild/RPMS/ -type f -name "*.rpm"
|
||||
UPLOAD_URL="${REPOSITORY_URL}/api/packages/${REPOSITORY_OWNER}/rpm/${PACKAGE_GROUP}/upload"
|
||||
echo "Uploading to url: ${UPLOAD_URL}"
|
||||
REGULAR_PACKAGE=$(find ${RPM_PATH} -maxdepth 2 -type f \( -name "${PACKAGE_NAME}*\.rpm" -a ! -name "*-devel*\.rpm" \) | head -1)
|
||||
DEVEL_PACKAGE=$(find ${RPM_PATH} -maxdepth 2 -type f -name "${PACKAGE_NAME}-devel*\.rpm" | head -1)
|
||||
if [[ -n "$REGULAR_PACKAGE" ]]; then
|
||||
echo "Found regular package at ${REGULAR_PACKAGE}, uploading it."
|
||||
curl --user ${UPLOAD_USER}:${UPLOAD_USER_TOKEN} \
|
||||
--upload-file ${REGULAR_PACKAGE} \
|
||||
${UPLOAD_URL}
|
||||
else
|
||||
echo "No regular package found, skipping..."
|
||||
fi
|
||||
if [[ -n "$DEVEL_PACKAGE" ]]; then
|
||||
echo "Found devel package at ${DEVEL_PACKAGE}, uploading it."
|
||||
curl --user ${UPLOAD_USER}:${UPLOAD_USER_TOKEN} \
|
||||
--upload-file ${DEVEL_PACKAGE} \
|
||||
${UPLOAD_URL}
|
||||
else
|
||||
echo "No devel package found, skipping..."
|
||||
fi
|
||||
find ./rpmbuild/RPMS/ -name "*.rpm" -type f \
|
||||
-exec curl \
|
||||
--user ${UPLOAD_USER}:${UPLOAD_USER_TOKEN} \
|
||||
--upload-file {} \
|
||||
${UPLOAD_URL} \;
|
||||
|
||||
Reference in New Issue
Block a user