Skip to content

Commit 8ed75c2

Browse files
authored
[Fix] OPENAPI_SHA check (#3935)
## Changes <!-- Summary of your changes that are easy to understand --> This PR checks if the openapi_sha is equal with the one used in databricks-sdk-go dependency. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] relevant acceptance tests are passing - [ ] using Go SDK
1 parent dccf6bd commit 8ed75c2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/validate-sha.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Validate openapi sha
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, edited]
6+
7+
jobs:
8+
validate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Validate SHA
15+
run: |
16+
Version=$(go list -m -json github.com/databricks/databricks-sdk-go | jq -r ".Version")
17+
OPENAPI_SHA_GO_SDK=$(curl https://raw.githubusercontent.com/databricks/databricks-sdk-go/$Version/.codegen/_openapi_sha)
18+
OPENAPI_SHA=$(cat .codegen/_openapi_sha)
19+
if [ "$OPENAPI_SHA_GO_SDK" != "$OPENAPI_SHA" ]; then
20+
echo "OpenAPI SHA mismatch"
21+
exit 1
22+
else
23+
echo "OpenAPI SHA match"
24+
fi

0 commit comments

Comments
 (0)