Skip to content

Commit

Permalink
fix: curl authentication on get translations
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc authored Sep 9, 2024
1 parent 8e47af0 commit 3fd7c1b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ jobs:
CREDENTIALS=$(printf ${{secrets.ONSHAPE_ACCESS_KEY}}:${{secrets.ONSHAPE_SECRET_KEY}} | base64 --wrap=0)
# Create new public document
curl -X POST $API/documents \
-H "accept: application/json;charset=UTF-8; qs=0.09" \
-H "accept: application/json;charset=UTF-8;qs=0.09" \
-H "Authorization: Basic $CREDENTIALS" \
-H "Content-Type: application/json;charset=UTF-8; qs=0.09" \
-H "Content-Type: application/json;charset=UTF-8;qs=0.09" \
-d '{ "name": "'${{matrix.detector_config}}_${{github.run_id}}'", "isPublic": "true" }' \
-o create.json
# Get document and workspace id
Expand All @@ -337,7 +337,7 @@ jobs:
echo "https://cad.onshape.com/documents/$did/w/$wid"
# Upload and translate STEP file
curl -X POST $API/translations/d/$did/w/$wid \
-H "accept: application/json;charset=UTF-8; qs=0.09" \
-H "accept: application/json;charset=UTF-8;qs=0.09" \
-H "Authorization: Basic $CREDENTIALS" \
-H "Content-Type: multipart/form-data" \
-F "formatName=STEP" \
Expand All @@ -348,7 +348,9 @@ jobs:
-o upload.json
# Check on upload
tid=$(jq -r .id upload.json)
curl -X GET $API/translations/$tid
curl -X GET $API/translations/$tid \
-H "accept: application/json;charset=UTF-8;qs=0.09" \
-H "Authorization: Basic $CREDENTIALS"
dump-constants:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3fd7c1b

Please sign in to comment.