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
24 changes: 21 additions & 3 deletions .github/workflows/bb-masking-semantic-type-global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,37 @@ jobs:
CHANGED_FILE="masking/semantic-type.json"
echo "Processing: $CHANGED_FILE"

response=$(curl -s -w "\n%{http_code}" --request PATCH "${{ steps.bytebase-login.outputs.api_url }}/settings/bb.workspace.semantic-types" \
# Check if file exists
if [ ! -f "$CHANGED_FILE" ]; then
echo "Error: $CHANGED_FILE does not exist"
exit 1
fi

# Print file content for debugging
echo "File content:"
cat "$CHANGED_FILE"

response=$(curl -v -s -w "\n%{http_code}" --request PATCH "${{ steps.bytebase-login.outputs.api_url }}/settings/bb.workspace.semantic-types" \
--header "Authorization: Bearer ${{ steps.bytebase-login.outputs.token }}" \
--header "Content-Type: application/json" \
--data @"$CHANGED_FILE")

# Extract status code and response body
status_code=$(echo "$response" | tail -n1)
body=$(echo "$response" | sed '$d')

echo "status_code=${status_code}"
echo "response_body=${body}"
# Save outputs for GitHub Actions
echo "status_code=${status_code}" >> $GITHUB_OUTPUT
echo "response_body<<EOF" >> $GITHUB_OUTPUT
echo "${body}" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo "Status Code: ${status_code}"
echo "Response Body: ${body}"

if [[ $status_code -lt 200 || $status_code -ge 300 ]]; then
echo "Failed with status code: $status_code"
echo "Response body: ${body}"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion masking/semantic-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
{
"id": "e8d3fd41-eba0-4afd-ae0f-32c91a4ee710",
"title": "Personal sensitive data x",
"title": "Personal sensitive data",
"description": "Custom semantic type with full masking for personal sensitive data",
"algorithm": {
"fullMask": {
Expand Down
Loading