Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): push STEP files into public onshape document #777

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: base64 --wrap=0
  • Loading branch information
wdconinc authored Sep 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 8e47af02a1ece9a03ca9e6e0d0614430ba59a041
9 changes: 5 additions & 4 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
@@ -322,9 +322,9 @@ jobs:
- name: Upload to new public OnShape document
run: |
API=https://cad.onshape.com/api/v6
CREDENTIALS=$(printf ${{secrets.ONSHAPE_ACCESS_KEY}}:${{secrets.ONSHAPE_SECRET_KEY}} | base64)
CREDENTIALS=$(printf ${{secrets.ONSHAPE_ACCESS_KEY}}:${{secrets.ONSHAPE_SECRET_KEY}} | base64 --wrap=0)
# Create new public document
curl -v -X POST $API/documents \
curl -X POST $API/documents \
-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" \
@@ -336,13 +336,14 @@ jobs:
# User access link
echo "https://cad.onshape.com/documents/$did/w/$wid"
# Upload and translate STEP file
curl -v -X POST $API/translations/d/$did/w/$wid \
curl -X POST $API/translations/d/$did/w/$wid \
-H "accept: application/json;charset=UTF-8; qs=0.09" \
-H "Authorization: Basic $CREDENTIALS" \
-H "Content-Type: multipart/form-data" \
-F "formatName=" \
-F "formatName=STEP" \
-F "flattenAssemblies=true" \
-F "translate=true" \
-F "yAxisIsUp=true" \
-F "file=@${{matrix.detector_config}}.stp" \
-o upload.json
# Check on upload