@postman-cse/onboarding-repo-sync 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +326 -0
- package/action.yml +148 -0
- package/dist/cli.cjs +26569 -0
- package/dist/index.cjs +26322 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# postman-repo-sync-action
|
|
2
|
+
|
|
3
|
+
Public open-alpha GitHub Action that owns Postman-to-repo sync concerns split out of `api-catalog-demo-infra/.github/actions/finalize`.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
Retained from finalize:
|
|
8
|
+
|
|
9
|
+
- Create or update Postman environments from runtime URLs.
|
|
10
|
+
- Associate Postman environments to system environments through Bifrost.
|
|
11
|
+
- Create mock servers and smoke monitors from generated collections.
|
|
12
|
+
- Export Postman collections in the Collection v3 multi-file YAML directory structure under `postman/collections/` (e.g., `[Baseline] <name>/collection.yaml`, nested folder and request YAML files). Persist repo variables and export environments into the repository under `postman/` and `.postman/`.
|
|
13
|
+
- Link the Postman workspace to the repository (GitHub or GitLab) through Bifrost.
|
|
14
|
+
- Commit synced artifacts and push them back to the current checked out ref.
|
|
15
|
+
|
|
16
|
+
Removed from finalize:
|
|
17
|
+
|
|
18
|
+
- Generate Fern docs or write documentation URLs back to GitHub.
|
|
19
|
+
- Store AWS deployment orchestration concerns in the public action interface.
|
|
20
|
+
- Push directly to `main`.
|
|
21
|
+
|
|
22
|
+
For existing repositories, use `generate-ci-workflow: false` to avoid touching workflow files, or set `ci-workflow-path` to materialize the generated pipeline under a non-conflicting filename such as `.github/workflows/postman-sync.yml`.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Git provider support
|
|
26
|
+
|
|
27
|
+
Workspace-to-repository linking via Bifrost supports both **GitHub** and **GitLab** (cloud and self-hosted) repository URLs. When `repo-url` is omitted, the action auto-detects the repository URL from `$GITHUB_REPOSITORY` (GitHub Actions) or `$CI_PROJECT_URL` (GitLab CI). You can also pass an explicit `repo-url` for any git provider.
|
|
28
|
+
|
|
29
|
+
### mTLS / Client Certificate Support
|
|
30
|
+
|
|
31
|
+
The generated CI workflow supports client certificates for testing APIs that require mTLS.
|
|
32
|
+
|
|
33
|
+
On GitHub, set these repository secrets:
|
|
34
|
+
|
|
35
|
+
- `POSTMAN_SSL_CLIENT_CERT_B64`
|
|
36
|
+
- `POSTMAN_SSL_CLIENT_KEY_B64`
|
|
37
|
+
- `POSTMAN_SSL_CLIENT_PASSPHRASE` (optional)
|
|
38
|
+
- `POSTMAN_SSL_EXTRA_CA_CERTS_B64` (optional)
|
|
39
|
+
|
|
40
|
+
When you pass the matching inputs to the action with a token that has `secrets:write`, the action can auto-persist these secrets for the generated workflow.
|
|
41
|
+
|
|
42
|
+
GitLab CI:
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
variables:
|
|
46
|
+
POSTMAN_SSL_CLIENT_CERT_B64: $POSTMAN_SSL_CLIENT_CERT_B64
|
|
47
|
+
POSTMAN_SSL_CLIENT_KEY_B64: $POSTMAN_SSL_CLIENT_KEY_B64
|
|
48
|
+
POSTMAN_SSL_CLIENT_PASSPHRASE: $POSTMAN_SSL_CLIENT_PASSPHRASE
|
|
49
|
+
POSTMAN_SSL_EXTRA_CA_CERTS_B64: $POSTMAN_SSL_EXTRA_CA_CERTS_B64
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Bitbucket Pipelines:
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
definitions:
|
|
56
|
+
variables:
|
|
57
|
+
POSTMAN_SSL_CLIENT_CERT_B64: "$POSTMAN_SSL_CLIENT_CERT_B64"
|
|
58
|
+
POSTMAN_SSL_CLIENT_KEY_B64: "$POSTMAN_SSL_CLIENT_KEY_B64"
|
|
59
|
+
POSTMAN_SSL_CLIENT_PASSPHRASE: "$POSTMAN_SSL_CLIENT_PASSPHRASE"
|
|
60
|
+
POSTMAN_SSL_EXTRA_CA_CERTS_B64: "$POSTMAN_SSL_EXTRA_CA_CERTS_B64"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> **Note:** Bitbucket secured variables have a size ceiling, so large cert chains may need to be split or stored elsewhere.
|
|
64
|
+
|
|
65
|
+
Azure DevOps:
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
steps:
|
|
69
|
+
- script: npx postman-repo-sync-action
|
|
70
|
+
env:
|
|
71
|
+
POSTMAN_SSL_CLIENT_CERT_B64: $(POSTMAN_SSL_CLIENT_CERT_B64)
|
|
72
|
+
POSTMAN_SSL_CLIENT_KEY_B64: $(POSTMAN_SSL_CLIENT_KEY_B64)
|
|
73
|
+
POSTMAN_SSL_CLIENT_PASSPHRASE: $(POSTMAN_SSL_CLIENT_PASSPHRASE)
|
|
74
|
+
POSTMAN_SSL_EXTRA_CA_CERTS_B64: $(POSTMAN_SSL_EXTRA_CA_CERTS_B64)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
> **Note:** Azure DevOps secret variables must be mapped into step `env`; do not reference them directly on the CLI.
|
|
78
|
+
|
|
79
|
+
### CLI Usage (Non-GitHub CI)
|
|
80
|
+
|
|
81
|
+
The `postman-repo-sync` CLI is available for GitLab CI, Bitbucket Pipelines, Azure DevOps, and other CI systems that need the repo sync workflow outside GitHub Actions. GitHub Actions users should continue using the `action.yml` interface.
|
|
82
|
+
|
|
83
|
+
Install it globally:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install -g postman-repo-sync-action
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Basic usage:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
postman-repo-sync \
|
|
93
|
+
--project-name core-payments \
|
|
94
|
+
--workspace-id ws-123 \
|
|
95
|
+
--baseline-collection-id col-baseline \
|
|
96
|
+
--smoke-collection-id col-smoke \
|
|
97
|
+
--contract-collection-id col-contract \
|
|
98
|
+
--postman-api-key "$POSTMAN_API_KEY" \
|
|
99
|
+
--result-json ./postman-repo-sync-result.json \
|
|
100
|
+
--dotenv-path ./postman-repo-sync.env \
|
|
101
|
+
--repo-write-mode commit-only
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The CLI auto-detects the CI provider from environment variables and uses that context to resolve the repository branch, commit SHA, and repo URL. `--repo-write-mode` defaults to `commit-and-push`; use `commit-only` when push credentials are not configured.
|
|
105
|
+
|
|
106
|
+
JSON is written to stdout. Use `--result-json` to write the same JSON payload to a file, or `--dotenv-path` to emit shell-sourceable `KEY=VALUE` output with the `POSTMAN_REPO_SYNC_` prefix. All logs go to stderr, so stdout stays reserved for JSON output.
|
|
107
|
+
|
|
108
|
+
GitLab CI:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
repo_sync:
|
|
112
|
+
image: node:20
|
|
113
|
+
script:
|
|
114
|
+
- npm install -g postman-repo-sync-action
|
|
115
|
+
- postman-repo-sync --project-name core-payments --workspace-id ws-123 --baseline-collection-id col-baseline --smoke-collection-id col-smoke --contract-collection-id col-contract --postman-api-key "$POSTMAN_API_KEY" --result-json postman-repo-sync-result.json --dotenv-path postman-repo-sync.env --repo-write-mode commit-and-push
|
|
116
|
+
artifacts:
|
|
117
|
+
paths:
|
|
118
|
+
- postman-repo-sync-result.json
|
|
119
|
+
- postman-repo-sync.env
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Bitbucket Pipelines:
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
image: node:20
|
|
126
|
+
|
|
127
|
+
pipelines:
|
|
128
|
+
default:
|
|
129
|
+
- step:
|
|
130
|
+
name: Postman repo sync
|
|
131
|
+
script:
|
|
132
|
+
- npm install -g postman-repo-sync-action
|
|
133
|
+
- postman-repo-sync --project-name core-payments --workspace-id ws-123 --baseline-collection-id col-baseline --smoke-collection-id col-smoke --contract-collection-id col-contract --postman-api-key "$POSTMAN_API_KEY" --result-json postman-repo-sync-result.json --dotenv-path postman-repo-sync.env --repo-write-mode commit-and-push
|
|
134
|
+
artifacts:
|
|
135
|
+
- postman-repo-sync-result.json
|
|
136
|
+
- postman-repo-sync.env
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Azure DevOps:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
steps:
|
|
143
|
+
- script: |
|
|
144
|
+
npm install -g postman-repo-sync-action
|
|
145
|
+
postman-repo-sync --project-name core-payments --workspace-id ws-123 --baseline-collection-id col-baseline --smoke-collection-id col-smoke --contract-collection-id col-contract --postman-api-key "$(POSTMAN_API_KEY)" --result-json $(Build.ArtifactStagingDirectory)/postman-repo-sync-result.json --dotenv-path $(Build.ArtifactStagingDirectory)/postman-repo-sync.env --repo-write-mode commit-and-push
|
|
146
|
+
displayName: Postman repo sync
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The CLI accepts the same repo-context signals as the action and auto-detects branch, SHA, and repo URL from provider-specific environment variables when available.
|
|
150
|
+
|
|
151
|
+
## Usage
|
|
152
|
+
|
|
153
|
+
```yaml
|
|
154
|
+
jobs:
|
|
155
|
+
repo-sync:
|
|
156
|
+
runs-on: ubuntu-latest
|
|
157
|
+
permissions:
|
|
158
|
+
actions: write
|
|
159
|
+
contents: write
|
|
160
|
+
steps:
|
|
161
|
+
- uses: actions/checkout@v4
|
|
162
|
+
- uses: postman-cs/postman-repo-sync-action@v0
|
|
163
|
+
with:
|
|
164
|
+
project-name: core-payments
|
|
165
|
+
workspace-id: ws-123
|
|
166
|
+
baseline-collection-id: col-baseline
|
|
167
|
+
smoke-collection-id: col-smoke
|
|
168
|
+
contract-collection-id: col-contract
|
|
169
|
+
environments-json: '["prod","stage"]'
|
|
170
|
+
system-env-map-json: '{"prod":"uuid-prod","stage":"uuid-stage"}'
|
|
171
|
+
env-runtime-urls-json: '{"prod":"https://api.example.com","stage":"https://stage-api.example.com"}'
|
|
172
|
+
environment-uids-json: '{}'
|
|
173
|
+
repo-write-mode: commit-and-push
|
|
174
|
+
postman-api-key: ${{ secrets.POSTMAN_API_KEY }}
|
|
175
|
+
postman-access-token: ${{ secrets.POSTMAN_ACCESS_TOKEN }}
|
|
176
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
177
|
+
gh-fallback-token: ${{ secrets.GH_FALLBACK_TOKEN }}
|
|
178
|
+
|
|
179
|
+
repo-sync-existing:
|
|
180
|
+
runs-on: ubuntu-latest
|
|
181
|
+
permissions:
|
|
182
|
+
actions: write
|
|
183
|
+
contents: write
|
|
184
|
+
variables: write
|
|
185
|
+
steps:
|
|
186
|
+
- uses: actions/checkout@v4
|
|
187
|
+
- uses: postman-cs/postman-repo-sync-action@v0
|
|
188
|
+
with:
|
|
189
|
+
project-name: core-payments
|
|
190
|
+
workspace-id: ws-123
|
|
191
|
+
baseline-collection-id: col-baseline
|
|
192
|
+
smoke-collection-id: col-smoke
|
|
193
|
+
contract-collection-id: col-contract
|
|
194
|
+
generate-ci-workflow: false
|
|
195
|
+
postman-api-key: ${{ secrets.POSTMAN_API_KEY }}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Current-ref push semantics
|
|
199
|
+
|
|
200
|
+
When `repo-write-mode=commit-and-push`, the action pushes back to the current checked out ref instead of hardcoding `main`. Resolution order is `current-ref`, then `GITHUB_HEAD_REF`, then `GITHUB_REF_NAME`. Pull request merge refs are normalized to `GITHUB_HEAD_REF`. Pushes use `HEAD:refs/heads/<resolved-branch>`.
|
|
201
|
+
|
|
202
|
+
If the action writes `.github/workflows/ci.yml`, provide a credential source that can update workflow files. The action prefers `gh-fallback-token` first for workflow-file pushes, then falls back to `github-token`.
|
|
203
|
+
|
|
204
|
+
### Collection v3 export
|
|
205
|
+
|
|
206
|
+
Collections are exported in the Postman Collection v3 format, producing a multi-file YAML directory structure under `postman/collections/`. Each collection (Baseline, Smoke, Contract) gets its own directory containing `collection.yaml` and nested folder/request YAML files. The `.postman/resources.yaml` manifest maps each v3 collection directory to its Postman UID.
|
|
207
|
+
|
|
208
|
+
## Inputs
|
|
209
|
+
|
|
210
|
+
| Input | Default | Notes |
|
|
211
|
+
| --- | --- | --- |
|
|
212
|
+
| `generate-ci-workflow` | `true` | Set to `false` for existing repos that already own their CI workflow layout. |
|
|
213
|
+
| `ci-workflow-path` | `.github/workflows/ci.yml` | Redirect generated CI to a non-conflicting path for existing repos. |
|
|
214
|
+
| `project-name` | | Service name used for environments, mock servers, and monitors. |
|
|
215
|
+
| `workspace-id` | | Workspace identifier used for workspace-link and export metadata. |
|
|
216
|
+
| `baseline-collection-id` | | Baseline collection exported into the repo and used for mock generation. |
|
|
217
|
+
| `monitor-type` | `cloud` | Type of monitor to create (`cloud` or `cli`). `cli` uses GitHub Actions cron.
|
|
218
|
+
| `smoke-collection-id` | | Smoke collection used for monitor creation. |
|
|
219
|
+
| `contract-collection-id` | | Contract collection exported into the repo. |
|
|
220
|
+
| `environments-json` | `["prod"]` | Environment slugs to create or update. |
|
|
221
|
+
| `repo-url` | | Explicit repository URL (GitHub or GitLab). Defaults to `https://github.com/$GITHUB_REPOSITORY` on GitHub Actions, or `$CI_PROJECT_URL` on GitLab CI. |
|
|
222
|
+
| `integration-backend` | `bifrost` | Public open-alpha starts with Bifrost only. |
|
|
223
|
+
| `workspace-link-enabled` | `true` | Keeps workspace linking in scope. |
|
|
224
|
+
| `environment-sync-enabled` | `true` | Keeps environment association in scope by default for the open-alpha demonstration path. |
|
|
225
|
+
| `system-env-map-json` | `{}` | JSON map of environment slug to system environment id. |
|
|
226
|
+
| `environment-uids-json` | `{}` | JSON map of environment slug to Postman environment uid. |
|
|
227
|
+
| `env-runtime-urls-json` | `{}` | JSON map of environment slug to runtime base URL. |
|
|
228
|
+
| `artifact-dir` | `postman` | Root directory for exported Postman artifacts. |
|
|
229
|
+
| `repo-write-mode` | `commit-and-push` | Generates files and pushes with current-ref semantics. |
|
|
230
|
+
| `current-ref` | | Optional explicit ref override for detached checkouts. |
|
|
231
|
+
| `committer-name` | `Postman CSE` | Commit author name for sync commits. |
|
|
232
|
+
| `committer-email` | `help@postman.com` | Commit author email for sync commits. |
|
|
233
|
+
| `postman-api-key` | | Postman API key for environment, mock, and monitor work. |
|
|
234
|
+
| `postman-access-token` | | Postman access token for Bifrost and system environment association. |
|
|
235
|
+
| `ssl-client-cert` | | Base64-encoded client certificate for mTLS-enabled API testing. |
|
|
236
|
+
| `ssl-client-key` | | Base64-encoded private key paired with `ssl-client-cert`. |
|
|
237
|
+
| `ssl-client-passphrase` | | Optional passphrase for the client key. |
|
|
238
|
+
| `ssl-extra-ca-certs` | | Base64-encoded extra CA certificates used to trust private certificate chains. |
|
|
239
|
+
| `github-token` | | GitHub token for repo variables and commits. |
|
|
240
|
+
| `gh-fallback-token` | | Fallback GitHub token for workflow-file and variable APIs. |
|
|
241
|
+
| `github-auth-mode` | `github_token_first` | GitHub auth mode for repo variable APIs. |
|
|
242
|
+
| `ci-workflow-base64` | | Optional base64-encoded workflow content that overrides the built-in CI template. |
|
|
243
|
+
|
|
244
|
+
### Obtaining `postman-api-key`
|
|
245
|
+
|
|
246
|
+
The `postman-api-key` is a Postman API key (PMAK) used for all standard Postman API operations — creating workspaces, uploading specs, generating collections, exporting artifacts, and managing environments.
|
|
247
|
+
|
|
248
|
+
**To generate one:**
|
|
249
|
+
|
|
250
|
+
1. Open the Postman desktop app or web UI.
|
|
251
|
+
2. Go to **Settings** (gear icon) → **Account Settings** → **API Keys**.
|
|
252
|
+
3. Click **Generate API Key**, give it a label, and copy the key (starts with `PMAK-`).
|
|
253
|
+
4. Set it as a GitHub secret:
|
|
254
|
+
```bash
|
|
255
|
+
gh secret set POSTMAN_API_KEY --repo <owner>/<repo>
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
> **Note:** The PMAK is a long-lived key tied to your Postman account. It does not require periodic renewal like the `postman-access-token`.
|
|
259
|
+
|
|
260
|
+
### Obtaining `postman-access-token` (Open Alpha)
|
|
261
|
+
|
|
262
|
+
> **⚠️ Open-alpha limitation:** The `postman-access-token` input requires a manually-extracted session token. There is currently no public API to exchange a Postman API key (PMAK) for an access token programmatically. This manual step will be eliminated before GA.
|
|
263
|
+
|
|
264
|
+
The `postman-access-token` is a Postman session token (`x-access-token`) required for internal API operations that the standard PMAK API key cannot perform — specifically workspace ↔ repo git sync (Bifrost) and system environment associations. Without it, those steps are silently skipped.
|
|
265
|
+
|
|
266
|
+
**To obtain and configure the token:**
|
|
267
|
+
|
|
268
|
+
1. **Log in via the Postman CLI** (requires a browser):
|
|
269
|
+
```bash
|
|
270
|
+
postman login
|
|
271
|
+
```
|
|
272
|
+
This opens a browser window for Postman's PKCE OAuth flow. Complete the sign-in.
|
|
273
|
+
|
|
274
|
+
2. **Extract the access token** from the CLI credential store:
|
|
275
|
+
```bash
|
|
276
|
+
cat ~/.postman/postmanrc | jq -r '.login._profiles[].accessToken'
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
3. **Set it as a GitHub secret** on your repository or organization:
|
|
280
|
+
```bash
|
|
281
|
+
# Repository-level secret
|
|
282
|
+
gh secret set POSTMAN_ACCESS_TOKEN --repo <owner>/<repo>
|
|
283
|
+
|
|
284
|
+
# Organization-level secret (recommended for multi-repo use)
|
|
285
|
+
gh secret set POSTMAN_ACCESS_TOKEN --org <org> --visibility selected --repos <repo1>,<repo2>
|
|
286
|
+
```
|
|
287
|
+
Paste the token value when prompted.
|
|
288
|
+
|
|
289
|
+
> **Important:** This token is session-scoped and will expire. When it does, operations that depend on it (workspace linking, system environment associations) will silently degrade. You will need to repeat the login and secret update process. There is no automated refresh mechanism.
|
|
290
|
+
|
|
291
|
+
> **Note:** `postman login --with-api-key` stores a PMAK — **not** the session token these APIs require. You must use the interactive browser login.
|
|
292
|
+
|
|
293
|
+
## Outputs
|
|
294
|
+
|
|
295
|
+
| Output | Meaning |
|
|
296
|
+
| --- | --- |
|
|
297
|
+
| `integration-backend` | Resolved integration backend for the run. |
|
|
298
|
+
| `resolved-current-ref` | Resolved push target based on current-ref semantics. |
|
|
299
|
+
| `workspace-link-status` | `success`, `skipped`, or `failed`. |
|
|
300
|
+
| `environment-sync-status` | `success`, `skipped`, or `failed`. |
|
|
301
|
+
| `environment-uids-json` | JSON map of environment slug to Postman environment uid. |
|
|
302
|
+
| `mock-url` | Created mock server URL. |
|
|
303
|
+
| `monitor-id` | Created smoke monitor UID. |
|
|
304
|
+
| `repo-sync-summary-json` | JSON summary of repo materialization and workspace sync outputs. |
|
|
305
|
+
| `commit-sha` | Commit SHA produced by repo-write-mode when a sync commit is created. |
|
|
306
|
+
|
|
307
|
+
## Local development
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
npm install
|
|
311
|
+
npm test
|
|
312
|
+
npm run typecheck
|
|
313
|
+
npm run build
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
`npm run build` produces the committed `dist/index.cjs` action bundle used by `action.yml`.
|
|
317
|
+
|
|
318
|
+
## Open-Alpha Release Strategy
|
|
319
|
+
|
|
320
|
+
- Open-alpha channel tags use `v0.x.y`.
|
|
321
|
+
- Consumers can pin immutable tags such as `v0.2.0` for reproducibility.
|
|
322
|
+
- Moving tag `v0` is used only as the rolling open-alpha channel.
|
|
323
|
+
|
|
324
|
+
## REST Migration Seam
|
|
325
|
+
|
|
326
|
+
The public input and output contract is backend-neutral. `integration-backend` defaults to `bifrost`, and backend-specific metadata remains internal so a future REST implementation can replace the backend without changing caller workflow syntax.
|
package/action.yml
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
name: postman-repo-sync-action
|
|
2
|
+
description: Sync exported Postman artifacts into a repository and expose open-alpha workspace-link and environment-sync contract outputs.
|
|
3
|
+
inputs:
|
|
4
|
+
|
|
5
|
+
generate-ci-workflow:
|
|
6
|
+
description: Whether to generate the CI workflow file
|
|
7
|
+
required: false
|
|
8
|
+
default: "true"
|
|
9
|
+
ci-workflow-path:
|
|
10
|
+
description: Path to write the generated CI workflow file
|
|
11
|
+
required: false
|
|
12
|
+
default: .github/workflows/ci.yml
|
|
13
|
+
project-name:
|
|
14
|
+
description: Service project name used for environment, mock, and monitor naming.
|
|
15
|
+
required: true
|
|
16
|
+
workspace-id:
|
|
17
|
+
description: Postman workspace ID used for workspace-link and export metadata.
|
|
18
|
+
required: false
|
|
19
|
+
baseline-collection-id:
|
|
20
|
+
description: Baseline collection ID used for exported artifacts and mock server creation.
|
|
21
|
+
required: false
|
|
22
|
+
monitor-type:
|
|
23
|
+
description: Type of monitor to create ("cloud" or "cli"). "cli" will skip cloud monitor creation and rely on the CI workflow.
|
|
24
|
+
required: false
|
|
25
|
+
default: cloud
|
|
26
|
+
smoke-collection-id:
|
|
27
|
+
description: Smoke collection ID used for monitor creation.
|
|
28
|
+
required: false
|
|
29
|
+
contract-collection-id:
|
|
30
|
+
description: Contract collection ID used for exported artifacts.
|
|
31
|
+
required: false
|
|
32
|
+
monitor-id:
|
|
33
|
+
description: Existing smoke monitor ID. When set, the action validates and reuses this monitor instead of creating a new one.
|
|
34
|
+
required: false
|
|
35
|
+
mock-url:
|
|
36
|
+
description: Existing mock server URL. When set, the action validates and reuses this mock instead of creating a new one.
|
|
37
|
+
required: false
|
|
38
|
+
monitor-cron:
|
|
39
|
+
description: Cron expression for monitor scheduling (e.g. '0 */6 * * *'). When empty, the monitor is created in a disabled state.
|
|
40
|
+
required: false
|
|
41
|
+
default: ""
|
|
42
|
+
environments-json:
|
|
43
|
+
description: JSON array of environment slugs to create or update.
|
|
44
|
+
required: false
|
|
45
|
+
default: '["prod"]'
|
|
46
|
+
repo-url:
|
|
47
|
+
description: 'Explicit repository URL (GitHub or GitLab). Defaults to https://github.com/$GITHUB_REPOSITORY on GitHub Actions, or $CI_PROJECT_URL on GitLab CI, when omitted.'
|
|
48
|
+
required: false
|
|
49
|
+
integration-backend:
|
|
50
|
+
description: Integration backend for workspace linking and environment sync.
|
|
51
|
+
required: false
|
|
52
|
+
default: bifrost
|
|
53
|
+
workspace-link-enabled:
|
|
54
|
+
description: Enable workspace linking.
|
|
55
|
+
required: false
|
|
56
|
+
default: 'true'
|
|
57
|
+
environment-sync-enabled:
|
|
58
|
+
description: Enable association of Postman environments to system environments.
|
|
59
|
+
required: false
|
|
60
|
+
default: 'true'
|
|
61
|
+
system-env-map-json:
|
|
62
|
+
description: JSON map of environment slug to system environment id.
|
|
63
|
+
required: false
|
|
64
|
+
default: '{}'
|
|
65
|
+
environment-uids-json:
|
|
66
|
+
description: JSON map of environment slug to Postman environment uid.
|
|
67
|
+
required: false
|
|
68
|
+
default: '{}'
|
|
69
|
+
env-runtime-urls-json:
|
|
70
|
+
description: JSON map of environment slug to runtime base URL.
|
|
71
|
+
required: false
|
|
72
|
+
default: '{}'
|
|
73
|
+
artifact-dir:
|
|
74
|
+
description: Root directory for exported Postman artifacts.
|
|
75
|
+
required: false
|
|
76
|
+
default: postman
|
|
77
|
+
repo-write-mode:
|
|
78
|
+
description: Repo mutation mode for generated artifacts and workflow files.
|
|
79
|
+
required: false
|
|
80
|
+
default: commit-and-push
|
|
81
|
+
current-ref:
|
|
82
|
+
description: Explicit ref override for push-changes when the checkout is detached.
|
|
83
|
+
required: false
|
|
84
|
+
committer-name:
|
|
85
|
+
description: Git committer name for sync commits.
|
|
86
|
+
required: false
|
|
87
|
+
default: Postman CSE
|
|
88
|
+
committer-email:
|
|
89
|
+
description: Git committer email for sync commits.
|
|
90
|
+
required: false
|
|
91
|
+
default: help@postman.com
|
|
92
|
+
postman-api-key:
|
|
93
|
+
description: Postman API key used for environment, mock, and monitor operations.
|
|
94
|
+
required: false
|
|
95
|
+
postman-access-token:
|
|
96
|
+
description: Postman access token used for Bifrost and system environment association.
|
|
97
|
+
required: false
|
|
98
|
+
github-token:
|
|
99
|
+
description: GitHub token used for repo variable persistence and commits.
|
|
100
|
+
required: false
|
|
101
|
+
gh-fallback-token:
|
|
102
|
+
description: Fallback token for repository variable APIs and workflow-file pushes.
|
|
103
|
+
required: false
|
|
104
|
+
github-auth-mode:
|
|
105
|
+
description: GitHub auth mode for repository variable APIs.
|
|
106
|
+
required: false
|
|
107
|
+
default: github_token_first
|
|
108
|
+
org-mode:
|
|
109
|
+
description: Whether the Postman team uses org-mode. When true, x-entity-team-id header is included in Bifrost proxy calls. Non-org teams must omit this header.
|
|
110
|
+
required: false
|
|
111
|
+
default: 'false'
|
|
112
|
+
ci-workflow-base64:
|
|
113
|
+
description: Optional base64-encoded ci.yml content. Defaults to the built-in template.
|
|
114
|
+
required: false
|
|
115
|
+
ssl-client-cert:
|
|
116
|
+
description: Base64-encoded PEM client certificate for Postman CLI mTLS runs.
|
|
117
|
+
required: false
|
|
118
|
+
ssl-client-key:
|
|
119
|
+
description: Base64-encoded PEM client private key for Postman CLI mTLS runs.
|
|
120
|
+
required: false
|
|
121
|
+
ssl-client-passphrase:
|
|
122
|
+
description: Optional passphrase for encrypted ssl-client-key.
|
|
123
|
+
required: false
|
|
124
|
+
ssl-extra-ca-certs:
|
|
125
|
+
description: Optional base64-encoded PEM CA certificate bundle for custom trust.
|
|
126
|
+
required: false
|
|
127
|
+
outputs:
|
|
128
|
+
integration-backend:
|
|
129
|
+
description: Resolved integration backend for the open-alpha run.
|
|
130
|
+
resolved-current-ref:
|
|
131
|
+
description: Resolved push target based on current-ref semantics.
|
|
132
|
+
workspace-link-status:
|
|
133
|
+
description: Whether workspace linking succeeded, was skipped, or failed.
|
|
134
|
+
environment-sync-status:
|
|
135
|
+
description: Whether environment sync succeeded, was skipped, or failed.
|
|
136
|
+
environment-uids-json:
|
|
137
|
+
description: JSON map of environment slug to Postman environment uid.
|
|
138
|
+
mock-url:
|
|
139
|
+
description: Created or reused mock server URL.
|
|
140
|
+
monitor-id:
|
|
141
|
+
description: Created or reused smoke monitor ID.
|
|
142
|
+
repo-sync-summary-json:
|
|
143
|
+
description: JSON summary of repo materialization and workspace sync outputs.
|
|
144
|
+
commit-sha:
|
|
145
|
+
description: Commit SHA produced by repo-write-mode, if any.
|
|
146
|
+
runs:
|
|
147
|
+
using: node20
|
|
148
|
+
main: dist/index.cjs
|