Skip to content

Revert "Fix RM catalog output in python SDK" #17

Revert "Fix RM catalog output in python SDK"

Revert "Fix RM catalog output in python SDK" #17

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@main
- name: Install Postman dependencies
run: npm i -g openapi-to-postmanv2
- name: Set up Python
uses: actions/setup-python@v2
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 notification
if: ${{ !env.ACT }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: criteo-api-sdk-generator
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: Postman Artefact publishing success <https://www.postman.com/realcriteo|Link to the collections>. If the environment is not prod please check the private collection.
SLACK_USERNAME: sdk-generation-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: ''
SLACK_ICON_EMOJI: green_check_mark
- name: Send failure notification
if: ${{ failure() }} && ${{ !env.ACT }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: criteo-api-sdk-generator
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: Postman Artefact publishing failure.
SLACK_USERNAME: sdk-generation-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: ''
SLACK_ICON_EMOJI: x