Skip to content

Conversation

@dgellow
Copy link

@dgellow dgellow commented Sep 26, 2025

What does this PR do?

This pull request adds a new workflow that does 2 things:

  1. generate SDK preview builds whenever the OpenAPI spec file is modified in a PR
  2. on PR merge, generate SDK builds that will be pushed to the different SDK repos (i.e start the release process)

Note

No repo secret STAINLESS_API_KEY is needed, the authentication is done automatically via GitHub OIDC.

Test Plan

I tested in my fork: stainless-api#3

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 26, 2025
@leseb
Copy link
Collaborator

leseb commented Oct 3, 2025

Just added the STAINLESS_API_KEY key to the repo :)

Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that this can only work when NOT submitting a PR from fork given Github security model on passing secrets to workflow.

@dgellow I'm wondering how this is used elsewhere in practice and how other projects overcome that? Thanks!

@dgellow
Copy link
Author

dgellow commented Oct 23, 2025

I'm moving this one back to draft until I have a great documented solution to share

@dgellow dgellow marked this pull request as draft October 23, 2025 13:15
@bbrowning
Copy link
Collaborator

Parts 1, 2, 3, and 4 of https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/ are important reading if we need to find a way to pass a secret into something triggered on every pull request.

@dgellow
Copy link
Author

dgellow commented Oct 24, 2025

Thanks @bbrowning. I actually already read those articles, unfortunately there are a few details that are making the mentioned solutions a no-go for this repo.
However I have a great solution that won't require any CI secret. I expect to have it ready later today and will move the PR out of draft asap :)

edit: well, not exactly today, my plane internet is spotty

@dgellow dgellow force-pushed the dgellow/add-stainless-workflows branch from 0dc7d00 to a0eb949 Compare October 25, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants