Skip to content

Commit

Permalink
explicitly describing Chris plugin upload step
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Oct 1, 2024
1 parent 1a25bc3 commit c40b695
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,32 @@ jobs:
- name: Upload ChRIS Plugin
id: upload
if: github.ref_type == 'tag'
uses: FNNDSC/upload-chris-plugin@v1
with:
description_file: /tmp/description.json
username: ${{ secrets.CHRISPROJECT_USERNAME }}
password: ${{ secrets.CHRISPROJECT_PASSWORD }}
chris_url: https://cube.chrisproject.org/api/v1/
compute_names: NERC

run: |
auth='${{ secrets.CHRISPROJECT_USERNAME }}:${{ secrets.CHRISPROJECT_PASSWORD }}'
admin_url="$(curl -sSf -u "$auth" '${{ inputs.chris_url }}' -H 'Accept: application/json' | jq -r '.collection_links.admin')"
chris_url="https://cube.chrisproject.org/api/v1/"
compute_names="NERC"
if [ "$admin_url" = "null" ]; then
echo "::error ::${{ secrets.CHRISPROJECT_USERNAME }} is not an admin for ${{ chris_url }}"
exit 1
fi
set +e
res="$(
curl -sS -u "$auth" "$admin_url" \
-H 'Accept: application/json' \
-F fname=@- \
-F compute_names='${{ compute_names }}' \
< /tmp/description.json
)"
rc=$?
if [ "$rc" != "0" ]; then
echo "Description >>>"
cat /tmp/description.json
echo "Response >>>"
echo "$res"
echo "::error ::Failed to upload plugin to $admin_url"
exit "$rc"
fi
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.3.2',
version = '1.3.3',
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 c40b695

Please sign in to comment.