mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
github: fail submit_sdk on catalog api error (#4294)
Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
6
.github/actions/submit_sdk/action.yml
vendored
6
.github/actions/submit_sdk/action.yml
vendored
@@ -49,7 +49,7 @@ runs:
|
||||
- name: Submit SDK
|
||||
shell: bash
|
||||
run: |
|
||||
curl -sX 'GET' \
|
||||
curl --fail -sX 'GET' \
|
||||
'${{ inputs.catalog-url }}/api/v0/0/sdk?length=500' \
|
||||
-H 'Accept: application/json' > sdk_versions.json
|
||||
if jq -r -e ".[] | select((.api == \"${{ inputs.firmware-api }}\") and .target == \"${{ inputs.firmware-target }}\")" sdk_versions.json > found_sdk.json ; then
|
||||
@@ -61,7 +61,7 @@ runs:
|
||||
if ! echo "${{ inputs.firmware-version }}" | grep -q -- "-rc" ; then
|
||||
SDK_ID=$(jq -r ._id found_sdk.json)
|
||||
echo "Marking SDK $SDK_ID as released"
|
||||
curl -X 'POST' \
|
||||
curl --fail-with-body -X 'POST' \
|
||||
"${{ inputs.catalog-url }}/api/v0/0/sdk/${SDK_ID}/release" \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: Bearer ${{ inputs.catalog-api-token }}' \
|
||||
@@ -69,7 +69,7 @@ runs:
|
||||
fi
|
||||
else
|
||||
echo "API version ${{ inputs.firmware-api }} doesn't exist in catalog, adding"
|
||||
curl -X 'POST' \
|
||||
curl --fail-with-body -X 'POST' \
|
||||
'${{ inputs.catalog-url }}/api/v0/0/sdk' \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Authorization: Bearer ${{ inputs.catalog-api-token }}' \
|
||||
|
||||
Reference in New Issue
Block a user