-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (44 loc) · 1.55 KB
/
sync_postman_collection.yml
File metadata and controls
54 lines (44 loc) · 1.55 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
name: Sync Postman Collection
on:
push:
branches:
- master
paths:
- update_postman_collection.py
- defs/asana_postman_collection.json
permissions:
id-token: write
jobs:
deploy-to-postman:
runs-on: ubuntu-latest
env:
POSTMAN_COLLECTION_ID: "37831743-a37a0580-d957-4a08-8fe0-c5c905679037"
POSTMAN_COLLECTION_FILE: "defs/asana_postman_collection.json"
steps:
- name: Checkout repository 📚
uses: actions/checkout@v5
- name: Authenticate to AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::403483446840:role/autogen_github_actions_beta_sync_postman_collection
- name: Load secrets
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: POSTMAN_API,postman_api_key
# postman_api_key secret is stored as {key:"***..."}
# GitHub Actions environment variable name is POSTMAN_API so to access "key" from the json we can use POSTMAN_API_KEY
parse-json-secrets: true
- name: Set up Python 🐍
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies 📦
run: |
python -m pip install --upgrade pip
pip install requests
- name: Publish Postman Collection 🚀
run: |
python update_postman_collection.py
echo ""
echo "✅ Postman Collection has been updated successfully!"