Skip to content

Generate And Push Postman Collections #60

Generate And Push Postman Collections

Generate And Push Postman Collections #60

name: Generate And Push Postman Collections
on:
push:
branches:
- main
paths:
- 'api-specifications/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Postman dependencies
run: npm i -g openapi-to-postmanv2
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Push Postman collections
run: python ./scripts/push_postman_collection.py
env:
POSTMAN_MANAGEMENT: ${{ secrets.POSTMAN_MANAGEMENT }}
POSTMAN_WORKSPACE_ID: ${{ secrets.POSTMAN_WORKSPACE_ID }}
POSTMAN_PREPROD_WORKSPACE_ID: ${{ secrets.POSTMAN_PREPROD_WORKSPACE_ID }}
IS_PROD: 1
shell: bash
- name: Send success/failure notification
if: ${{ !env.ACT }}
uses: craftech-io/slack-action@v1
with:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
channel_name: criteo-api-sdk-generator
slack_channel: criteo-api-sdk-generator
slack_username: sdk-generation-bot
#Postman Artefact publishing success <https://www.postman.com/realcriteo|Link to the collections>. If the environment is not prod please check the private collection.
status: ${{ job.status }}