diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 086b907..cd1ea2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,18 +129,22 @@ jobs: - name: Upload to ChRIS Store if: "!endsWith(steps.determine.outputs.dock_image, ':latest')" run: | - repo=${{ steps.determine.outputs.repo }} dock_image=${{ steps.determine.outputs.dock_image }} + plname="$(sed 's/^.*\///' <<< $GITHUB_REPOSITORY)" && echo "name=$plname" descriptor_file=$(mktemp --suffix .json) - cat > $descriptor_file <<< "${{ steps.pluginmeta.outputs.json }}" + cat > $descriptor_file << ENDOFPLUGINJSONDESCRIPTION + ${{ steps.pluginmeta.outputs.json }} + ENDOFPLUGINJSONDESCRIPTION res=$( curl -s -u "${{ secrets.CHRIS_STORE_USER }}" "https://chrisstore.co/api/v1/plugins/" \ - -F "name=$(sed 's/^.*\///' <<< $repo)" \ + -H 'Accept:application/vnd.collection+json' \ + -F "name=$plname" \ -F "dock_image=$dock_image" \ -F "descriptor_file=@$descriptor_file" \ -F "public_repo=https://github.com/${{ github.repository }}" ) success=$? + echo "::debug::$res" if [ "$success" = "0" ]; then href="$(jq -r '.collection.items[0].href' <<< "$res")" echo $href