This repository was archived by the owner on Apr 8, 2026. It is now read-only.
forked from stainless-api/upload-openapi-spec-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
175 lines (171 loc) · 5.52 KB
/
action.yml
File metadata and controls
175 lines (171 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Stainless — Build SDK
description: Build SDKs
branding:
icon: book-open
color: green
runs:
using: node20
main: ../dist/build.js
# All inputs are also supported in GitLab CI, input as an all-uppercase variable.
inputs:
stainless_api_key:
description: >-
Stainless API key. Optional for GitHub Actions (will use OIDC authentication
if not provided, requires 'id-token: write' permission). Required for GitLab CI.
required: false
org:
description: Stainless organization name.
required: false
project:
description: Stainless project name.
required: true
oas_path:
description: >-
Path to your OpenAPI spec. If omitted, and `merge_branch` is false,
will use the existing OpenAPI spec on the Stainless branch.
required: false
config_path:
description: >-
Path to your Stainless config. If omitted, and `merge_branch` is false,
will use the existing Stainless config on the Stainless branch.
required: false
commit_message:
description: >-
Commit message to use in the commits in the SDK repo. Use a commit
message in the conventional commits format:
https://www.conventionalcommits.org/en/v1.0.0/
required: false
guess_config:
description: >-
If true, update the existing Stainless config file based on the OpenAPI
spec. Cannot be specified if `config_path` is specified.
required: false
default: false
fail_on:
description: >-
When to fail the run based on build conclusion. Options: 'note',
'warning', 'error', 'fatal', 'never'.
required: false
default: "error"
make_comment:
description: >-
If true, will comment on the pull request with the build results.
required: false
default: "true"
multiple_commit_messages:
description: >-
If true, the comment will display separate commit messages for each SDK,
instead of using a single commit message for all SDKs.
required: false
default: "false"
github_token:
description: >-
A GitHub token used for making comments on pull requests. Required if
`make_comment` is true. The token must have the `pull-requests: write`
permission. Defaults to the current workflow token.
required: false
default: ${{ github.token }}
branch:
description: Stainless branch to create the build on.
required: false
default: main
merge_branch:
description: >-
Stainless branch to merge changes from. The OpenAPI spec and Stainless
config from the `merge_branch` will be used to create a build on top of
the Stainless branch.
required: false
base_revision:
description: >-
A base revision to compare this build against. Must be a config commit
SHA. Cannot be specified if `merge_branch` is specified.
required: false
base_branch:
description: >-
Stainless branch to create the base build on. Must be specified if
`base_revision` is specified.
required: false
default_branch:
description: >-
The branch of the repository that the `main` Stainless branch of your
project gets its OpenAPI spec from. This is usually the default branch of
your repository. Used to determine whether the build should be skipped.
required: false
default: ${{ github.event.repository.default_branch }}
output_dir:
description: >-
Directory to write output files to. Defaults to the runner's temporary
directory.
required: false
default: ${{ runner.temp }}
documented_spec_path:
description: >-
Path to write an OpenAPI spec with SDK code samples, if configured. See
https://app.stainless.com/docs/reference/config#open-api-config for
more details.
required: false
log_level:
description: >-
Log verbosity level. Options: 'debug', 'info', 'warn', 'error', 'off'.
Use 'debug' for detailed diagnostic information.
required: false
default: "info"
outputs:
outcomes:
description: >-
JSON-stringified object of build outcomes. Keys are languages, and values
contain the `commit` result of the build for that language. Will look
like:
```
{
"typescript": {
"install_url": "https://pkg.stainless.com/...",
"commit": {
"conclusion": "success",
"commit": {
"sha": "...",
"repo": {
"branch": "...",
"name": "...",
"owner": "...",
...
},
}
...
},
},
...
}
```
base_outcomes:
description: >-
JSON-stringified object of base build outcomes. Present when
`base_revision` is specified. Keys are languages, and values contain the
`commit` result of the build for that language. Will look like:
```
{
"typescript": {
"install_url": "https://pkg.stainless.com/...",
"commit": {
"conclusion": "success",
"commit": {
"sha": "...",
"repo": {
"branch": "...",
"name": "...",
"owner": "...",
...
},
}
...
},
},
...
}
```
documented_spec_path:
description: >-
Path to an OpenAPI spec with SDK code samples. Present when `output_dir`
is specified and `code_samples` is in your Stainless config. See
https://app.stainless.com/docs/reference/config#open-api-config for
more details.