diff --git a/.github/workflows/spec-sync-on-merge.yml b/.github/workflows/spec-sync-on-merge.yml index fd62c4034f..d7ac487c8e 100644 --- a/.github/workflows/spec-sync-on-merge.yml +++ b/.github/workflows/spec-sync-on-merge.yml @@ -147,11 +147,10 @@ jobs: # Get the tree SHA from the base commit (base_tree requires a tree SHA, not a commit SHA) BASE_TREE_SHA=$(gh api "repos/${SPEC_REPO}/git/commits/${BASE_SHA}" --jq '.tree.sha') - # Create blob and commit via API (commits created through the API are automatically signed by GitHub) - BLOB_SHA=$(gh api "repos/${SPEC_REPO}/git/blobs" \ - -f "content=$(base64 -w 0 controller.json)" \ - -f "encoding=base64" \ - --jq '.sha') + # Create blob via API using --input to avoid ARG_MAX limit on large specs + BLOB_SHA=$(base64 -w 0 controller.json | \ + jq -Rs '{content: ., encoding: "base64"}' | \ + gh api "repos/${SPEC_REPO}/git/blobs" --input - --jq '.sha') TREE_SHA=$(gh api "repos/${SPEC_REPO}/git/trees" \ -f "base_tree=${BASE_TREE_SHA}" \