Skip to content

Commit dd14a38

Browse files
authored
Add GitHub Actions workflow for Postman collection
1 parent 94f67cf commit dd14a38

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update Postman Collection
2+
3+
on:
4+
push:
5+
paths:
6+
- spoonacular-openapi-3.json
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish-postman:
11+
name: Publish Postman Collection
12+
runs-on: ubuntu-latest
13+
env:
14+
POSTMAN_COLLECTION_ID: ${{ vars.POSTMAN_COLLECTION_ID }}
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Transform OpenAPI to Postman collection
21+
id: transform
22+
uses: stcalica/postman-publish-action/actions/transform-openapi-from-file@v1
23+
with:
24+
postman_api_key: ${{ secrets.POSTMAN_API_KEY }}
25+
openapi_schema_path: './spoonacular-openapi-3.json'
26+
27+
- name: Update Postman collection
28+
uses: stcalica/postman-publish-action/actions/update-collection@v1
29+
with:
30+
postman_api_key: ${{ secrets.POSTMAN_API_KEY }}
31+
collection_id: ${{ env.POSTMAN_COLLECTION_ID }}
32+
collection_data: ${{ steps.transform.outputs.postman_collection }}

0 commit comments

Comments
 (0)