fix: typo if -> fi

This commit is contained in:
Michael Sasser 2024-12-27 16:12:36 +01:00
parent 04e089518b
commit e0c2fbb48c
Signed by: michael
GPG key ID: 5F653AC7631F5151
2 changed files with 10 additions and 10 deletions

View file

@ -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 }}

View file

@ -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