Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,4 @@ jobs:
artifact: "specs"
path: "openapi-good.json"
upload_to_bucket: false
fail_threshold: warn

fail_threshold: warn
12 changes: 8 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,17 @@ jobs:
METADATA="{\"repository\": \"$REPO_NAME\"}"

echo "Publishing spec: $GHA_API_PATH"
curl --fail-with-body -sS \

RESPONSE=$(curl --fail-with-body -sS \
Comment thread
rikard-swahn marked this conversation as resolved.
-X PUT \
-H "Authorization: Bearer $ID_TOKEN" \
-F "metadata=$METADATA;type=application/json" \
-F "spec=@/tmp/specs/$filename" \
"$CLOUD_RUN_ENDPOINT"

"$CLOUD_RUN_ENDPOINT") || {
DETAIL=$(echo "$RESPONSE" | jq -r '.detail')
echo "::error file=$GHA_API_PATH,line=1::$DETAIL"
exit 1
}

echo "Successfully published: $GHA_API_PATH"

9 changes: 7 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,17 @@ jobs:
METADATA="{\"repository\": \"$REPO_NAME\"}"

echo "Uploading to api-spec-registry with dryRun=true..."
curl --fail-with-body -sS \

RESPONSE=$(curl --fail-with-body -sS \
-X PUT \
-H "Authorization: Bearer $ID_TOKEN" \
-F "metadata=$METADATA;type=application/json" \
-F "spec=@/tmp/specs/$filename" \
"$CLOUD_RUN_ENDPOINT?dryRun=true"
"$CLOUD_RUN_ENDPOINT?dryRun=true") || {
DETAIL=$(echo "$RESPONSE" | jq -r '.detail')
echo "::error file=$GHA_API_PATH,line=1::$DETAIL"
exit 1
}

echo "Successfully validated: $GHA_API_PATH"

Loading