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:
		
							parent
							
								
									91813831c6
								
							
						
					
					
						commit
						8bfa9898e3
					
				
							
								
								
									
										8
									
								
								.github/actions/submit_sdk/action.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/actions/submit_sdk/action.yml
									
									
									
									
										vendored
									
									
								
							@ -7,7 +7,7 @@ inputs:
 | 
				
			|||||||
  catalog-url:
 | 
					  catalog-url:
 | 
				
			||||||
    description: The URL of the Catalog API
 | 
					    description: The URL of the Catalog API
 | 
				
			||||||
    required: true
 | 
					    required: true
 | 
				
			||||||
  catalog-token:
 | 
					  catalog-api-token:
 | 
				
			||||||
    description: The token to use to authenticate with the Catalog API
 | 
					    description: The token to use to authenticate with the Catalog API
 | 
				
			||||||
    required: true
 | 
					    required: true
 | 
				
			||||||
  firmware-api:
 | 
					  firmware-api:
 | 
				
			||||||
@ -41,7 +41,7 @@ runs:
 | 
				
			|||||||
            curl -X 'POST' \
 | 
					            curl -X 'POST' \
 | 
				
			||||||
              "${{ inputs.catalog-url }}/api/v0/0/sdk/${SDK_ID}/release" \
 | 
					              "${{ inputs.catalog-url }}/api/v0/0/sdk/${SDK_ID}/release" \
 | 
				
			||||||
              -H 'Accept: application/json' \
 | 
					              -H 'Accept: application/json' \
 | 
				
			||||||
              -H 'Authorization: Bearer ${{ inputs.catalog-token }}' \
 | 
					              -H 'Authorization: Bearer ${{ inputs.catalog-api-token }}' \
 | 
				
			||||||
              -d ''
 | 
					              -d ''
 | 
				
			||||||
          fi
 | 
					          fi
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
@ -49,7 +49,7 @@ runs:
 | 
				
			|||||||
          curl -X 'POST' \
 | 
					          curl -X 'POST' \
 | 
				
			||||||
            '${{ inputs.catalog-url }}/api/v0/0/sdk' \
 | 
					            '${{ inputs.catalog-url }}/api/v0/0/sdk' \
 | 
				
			||||||
            -H 'Accept: application/json' \
 | 
					            -H 'Accept: application/json' \
 | 
				
			||||||
            -H 'Authorization: Bearer ${{ inputs.catalog-token }}' \
 | 
					            -H 'Authorization: Bearer ${{ inputs.catalog-api-token }}' \
 | 
				
			||||||
            -H 'Content-Type: application/json' \
 | 
					            -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
 | 
					        fi
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -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}})
 | 
					            - [☁️ 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
 | 
					          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 }}
 | 
					        if: ${{ steps.names.outputs.event_type == 'tag' && matrix.target == env.DEFAULT_TARGET }}
 | 
				
			||||||
        uses: ./.github/actions/submit_sdk
 | 
					        uses: ./.github/actions/submit_sdk
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          catalog-url: ${{ secrets.CATALOG_STAGING_URL }}
 | 
					          catalog-url: ${{ secrets.CATALOG_STAGING_URL }}
 | 
				
			||||||
          catalog-api-token: ${{ secrets.CATALOG_STAGING_API_TOKEN }}
 | 
					          catalog-api-token: ${{ secrets.CATALOG_STAGING_API_TOKEN }}
 | 
				
			||||||
          firmware-api: ${{ steps.build-fw.outputs.firmware_api }}
 | 
					          firmware-api: ${{ steps.build-fw.outputs.firmware_api }}
 | 
				
			||||||
          firwmare-target: ${{ matrix.target }}
 | 
					          firmware-target: ${{ matrix.target }}
 | 
				
			||||||
          firmware-version: ${{ steps.names.outputs.suffix }}
 | 
					          firmware-version: ${{ steps.names.outputs.suffix }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: 'SDK submission to prod catalog'
 | 
					      - name: 'SDK submission to prod catalog'
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user