Skip to content

Commit

Permalink
updated CI to upload plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Oct 1, 2024
1 parent 0b70499 commit be4de30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
43 changes: 15 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,32 +135,19 @@ jobs:
readme-filepath: ./README.rst
repository: ${{ steps.determine.outputs.repo }}

- name: Upload to ChRIS Store
if: "!endsWith(steps.determine.outputs.dock_image, ':latest')"
run: |
dock_image=${{ steps.determine.outputs.dock_image }}
plname="$(sed 's/^.*\///' <<< $GITHUB_REPOSITORY)" && echo "name=$plname"
descriptor_file=$(mktemp --suffix .json)
cat > $descriptor_file << ENDOFPLUGINJSONDESCRIPTION
${{ steps.pluginmeta.outputs.json }}
ENDOFPLUGINJSONDESCRIPTION
res=$(
curl -s -u "${{ secrets.CHRIS_STORE_USER }}" "https://chrisstore.co/api/v1/plugins/" \
-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
echo "::set-output name=pluginurl::$href"
else
echo "::error ::Failed upload to ChRIS Store"
echo "$res"
exit $success
fi
- name: Upload ChRIS Plugin
id: upload
if: github.ref_type == 'tag'
uses: FNNDSC/upload-chris-plugin@v1
with:
dock_image: ${{ steps.info.outputs.local_tag }}
run: |
description_file=$(mktemp --suffix .json)
cat > $description_file << ENDOFPLUGINJSONDESCRIPTION
${{ steps.pluginmeta.outputs.json }}
ENDOFPLUGINJSONDESCRIPTION
username: ${{ secrets.CHRISPROJECT_USERNAME }}
password: ${{ secrets.CHRISPROJECT_PASSWORD }}
chris_url: https://cube.chrisproject.org/api/v1/
compute_names: NERC

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name = 'csv2json',
version = '1.2.4',
version = '1.2.5',
description = 'An app to convert CSV generated from pl-lld_inference to a JSON representation',
long_description = readme,
author = 'FNNDSC',
Expand Down

0 comments on commit be4de30

Please sign in to comment.