From e06390119f04c95e9ceb5b981d0ffe30746f3753 Mon Sep 17 00:00:00 2001 From: Michael Sasser Date: Fri, 27 Dec 2024 16:24:52 +0100 Subject: [PATCH] fix: typo repository_owner -> package_owner --- action.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index d08df42..5ea23fa 100644 --- a/action.yml +++ b/action.yml @@ -110,7 +110,7 @@ runs: curl --version echo '::endgroup::' - PACKAGE_URL='${{ steps.prepared.outputs.forge_url }}/api/packages/${{ steps.prepared.outputs.repository_owner }}/arch/${{ inputs.package_repository_name }}' + PACKAGE_URL='${{ steps.prepared.outputs.forge_url }}/api/packages/${{ steps.prepared.outputs.package_owner }}/arch/${{ inputs.package_repository_name }}' echo "PACKAGE_URL: ${PACKAGE_URL}" echo '::group::Request' @@ -142,8 +142,14 @@ runs: exit 0 elif ((HTTP_CODE >= 400 && HTTP_CODE <= 499)); then # Client Error - if [[ "$HTTP_CODE" == 409 ]]; then - echo "::warning title=package already exists::The package with the same name, pkgver, pkgrel and architecture (${{ steps.prepared.outputs.package }}) already exists and was therefore not updated." + if [[ "$HTTP_CODE" == 401 ]]; then + echo "::error title=Unauthorized::The authentication credentials given to the action are insufficiant to push the package." + exit 1 + elif [[ "$HTTP_CODE" == 403 ]]; then + echo "::error title=Forbidden::No authentication credentials where given to the action to push the package." + exit 1 + elif [[ "$HTTP_CODE" == 409 ]]; then + echo "::warning title=Conflict::The package with the same name, pkgver, pkgrel and architecture (${{ steps.prepared.outputs.package }}) already exists and was therefore not updated." exit 0 fi echo "::error title=Client Error::The server returned a client error with the HTTP code ${HTTP_CODE}."