Skip to content

Commit d82ee8d

Browse files
update
1 parent 3af418d commit d82ee8d

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/bb-masking-semantic-type-global.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,37 @@ jobs:
6868
CHANGED_FILE="masking/semantic-type.json"
6969
echo "Processing: $CHANGED_FILE"
7070
71-
response=$(curl -s -w "\n%{http_code}" --request PATCH "${{ steps.bytebase-login.outputs.api_url }}/settings/bb.workspace.semantic-types" \
71+
# Check if file exists
72+
if [ ! -f "$CHANGED_FILE" ]; then
73+
echo "Error: $CHANGED_FILE does not exist"
74+
exit 1
75+
fi
76+
77+
# Print file content for debugging
78+
echo "File content:"
79+
cat "$CHANGED_FILE"
80+
81+
response=$(curl -v -s -w "\n%{http_code}" --request PATCH "${{ steps.bytebase-login.outputs.api_url }}/settings/bb.workspace.semantic-types" \
7282
--header "Authorization: Bearer ${{ steps.bytebase-login.outputs.token }}" \
83+
--header "Content-Type: application/json" \
7384
--data @"$CHANGED_FILE")
7485
7586
# Extract status code and response body
7687
status_code=$(echo "$response" | tail -n1)
7788
body=$(echo "$response" | sed '$d')
7889
79-
echo "status_code=${status_code}"
80-
echo "response_body=${body}"
90+
# Save outputs for GitHub Actions
91+
echo "status_code=${status_code}" >> $GITHUB_OUTPUT
92+
echo "response_body<<EOF" >> $GITHUB_OUTPUT
93+
echo "${body}" >> $GITHUB_OUTPUT
94+
echo "EOF" >> $GITHUB_OUTPUT
95+
96+
echo "Status Code: ${status_code}"
97+
echo "Response Body: ${body}"
8198
8299
if [[ $status_code -lt 200 || $status_code -ge 300 ]]; then
83100
echo "Failed with status code: $status_code"
101+
echo "Response body: ${body}"
84102
exit 1
85103
fi
86104

masking/semantic-type.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"id": "e8d3fd41-eba0-4afd-ae0f-32c91a4ee710",
18-
"title": "Personal sensitive data x",
18+
"title": "Personal sensitive data",
1919
"description": "Custom semantic type with full masking for personal sensitive data",
2020
"algorithm": {
2121
"fullMask": {

0 commit comments

Comments
 (0)