Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 6 additions & 10 deletions .github/workflows/4-bb-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,20 @@ jobs:
echo "==========================="
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Processing $file ================================================"
echo "DEBUG: Starting to process file: $file"
SQL_CONTENT=$(base64 < "$file")
echo "finishing processing $file ======================="
echo "SQL_CONTENT=$SQL_CONTENT" >> $GITHUB_ENV
echo "DEBUG: SQL content encoded"
STEP_ID=$(python3 -c "import uuid; print(str(uuid.uuid4()))")
echo "STEP_ID=$STEP_ID" >> $GITHUB_ENV
BASE_URL="${{ steps.bytebase-login.outputs.api_url }}"
echo "BASE_URL1111=$BASE_URL"
echo "BASE_URL=$BASE_URL" >> $GITHUB_ENV
echo "DEBUG: About to make first API call to create sheet"
sheet_data=$(call_api \
"$BASE_URL/projects/$PROJECT/sheets" \
"POST" \
"{\"title\":\"\",\"content\":\"$SQL_CONTENT\",\"type\":\"TYPE_SQL\",\"source\":\"SOURCE_BYTEBASE_ARTIFACT\",\"visibility\":\"VISIBILITY_PUBLIC\"}" \
"Create Sheet")
echo "finishing sheetdata ================================================"
echo "DEBUG: After first API call"
SHEET_NAME=$(echo "$sheet_data" | python3 -c "import sys, json; print(json.load(sys.stdin)['name'])")
echo "finishing sheetname ================================================"
Expand Down
Loading