From e0c2fbb48c6171b44c030e923775783aac07ba55 Mon Sep 17 00:00:00 2001 From: Michael Sasser Date: Fri, 27 Dec 2024 16:12:36 +0100 Subject: [PATCH] fix: typo if -> fi --- README.md | 2 +- action.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 10d1129..3d01b49 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ jobs: id: build uses: https://git.michaelsasser.org/actions/makepkg@main - - name: Build Package + - name: Push Package uses: https://git.michaelsasser.org/actions/arch-package-release@main with: package: ${{ steps.build.outputs.package }} diff --git a/action.yml b/action.yml index 3ca8e90..d08df42 100644 --- a/action.yml +++ b/action.yml @@ -103,7 +103,6 @@ runs: echo '::endgroup::' - # TODO: Handle overwrite - name: Push Package shell: bash run: | @@ -112,6 +111,7 @@ runs: echo '::endgroup::' PACKAGE_URL='${{ steps.prepared.outputs.forge_url }}/api/packages/${{ steps.prepared.outputs.repository_owner }}/arch/${{ inputs.package_repository_name }}' + echo "PACKAGE_URL: ${PACKAGE_URL}" echo '::group::Request' RESPONSE=$( @@ -136,20 +136,20 @@ runs: echo "${HTTP_CODE}" echo '::endgroup::' - if (($HTTP_CODE >= 200 && $HTTP_CODE <= 399)); then + if ((HTTP_CODE >= 200 && HTTP_CODE <= 399)); then # Success - echo 'The package \'${{ steps.prepared.outputs.package }}\' was successfully pushed to the package registry' + echo 'The package ${{ steps.prepared.outputs.package }} was successfully pushed to the package registry' exit 0 - elif (($HTTP_CODE >= 400 && $HTTP_CODE <= 499)); then + 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." + 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." exit 0 - if - echo "::error title=Client Error::The server returned a client error with the HTTP code '${HTTP_CODE}'." + fi + echo "::error title=Client Error::The server returned a client error with the HTTP code ${HTTP_CODE}." exit 1 - elif (($HTTP_CODE >= 500 && $HTTP_CODE <= 599)); then + elif ((HTTP_CODE >= 500 && HTTP_CODE <= 599)); then # Server error - echo "::error title=Server Error::The server returned a server error with the HTTP code '${HTTP_CODE}'." + echo "::error title=Server Error::The server returned a server error with the HTTP code ${HTTP_CODE}." exit 1 fi