github: final fixes for SDK publishing (#3069)

* Fixes 4 fixes 4 fixes
* gh: proper step naming
* github: Restored SDK processing logic
This commit is contained in:
hedger 2023-09-12 04:20:45 +03:00 committed by GitHub
parent 91813831c6
commit 8bfa9898e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -7,7 +7,7 @@ inputs:
catalog-url:
description: The URL of the Catalog API
required: true
catalog-token:
catalog-api-token:
description: The token to use to authenticate with the Catalog API
required: true
firmware-api:
@ -41,7 +41,7 @@ runs:
curl -X 'POST' \
"${{ inputs.catalog-url }}/api/v0/0/sdk/${SDK_ID}/release" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer ${{ inputs.catalog-token }}' \
-H 'Authorization: Bearer ${{ inputs.catalog-api-token }}' \
-d ''
fi
else
@ -49,7 +49,7 @@ runs:
curl -X 'POST' \
'${{ inputs.catalog-url }}/api/v0/0/sdk' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer ${{ inputs.catalog-token }}' \
-H 'Authorization: Bearer ${{ inputs.catalog-api-token }}' \
-H 'Content-Type: application/json' \
-d "{\"name\": \"${{ inputs.firmware-version }}\", \"target\": \"${{ inputs.firmware-target }}\", \"api\": \"${{ inputs.firmware-api }}\"}\"
-d "{\"name\": \"${{ inputs.firmware-version }}\", \"target\": \"${{ inputs.firmware-target }}\", \"api\": \"${{ inputs.firmware-api }}\"}"
fi

View file

@ -148,14 +148,14 @@ jobs:
- [☁️ Web/App updater](https://lab.flipper.net/?url=https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz&channel=${{steps.names.outputs.branch_name}}&version=${{steps.names.outputs.commit_sha}})
edit-mode: replace
- name: 'SDK submission to dev catalog'
- name: 'SDK submission to staging catalog'
if: ${{ steps.names.outputs.event_type == 'tag' && matrix.target == env.DEFAULT_TARGET }}
uses: ./.github/actions/submit_sdk
with:
catalog-url: ${{ secrets.CATALOG_STAGING_URL }}
catalog-api-token: ${{ secrets.CATALOG_STAGING_API_TOKEN }}
firmware-api: ${{ steps.build-fw.outputs.firmware_api }}
firwmare-target: ${{ matrix.target }}
firmware-target: ${{ matrix.target }}
firmware-version: ${{ steps.names.outputs.suffix }}
- name: 'SDK submission to prod catalog'