# Weekly synch of the AdyenDev Postman collections

name: "Sync Postman collections"

on:
  workflow_dispatch:
  schedule:
  - cron: '0 13 * * *'
  
jobs:
  update-collections:
    name: "Sync Postman collections"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: update-checkout
        uses: gcatanese/push-to-postman-action@main
        with:
          goal: update
          postman-key: ${{ secrets.POSTMAN_API_KEY }}
          postman-file: 'postman/CheckoutService-v71.json'
          collection-id: '8426282-04caed9f-44a4-49a1-a803-ccd4f08bbbcb'
      - name: update-balance-control
        uses: gcatanese/push-to-postman-action@main
        with:
          goal: update
          postman-key: ${{ secrets.POSTMAN_API_KEY }}
          postman-file: 'postman/BalanceControlService-v1.json'
          collection-id: '8426282-959dfdf2-5a52-4f9f-86c6-db3743d43313'  
      - name: update-management
        uses: gcatanese/push-to-postman-action@main
        with:
          goal: update
          postman-key: ${{ secrets.POSTMAN_API_KEY }}
          postman-file: 'postman/ManagementService-v3.json'
          collection-id: '8426282-a4091abb-0cb9-48fa-9c73-5869e2212c33'   
      - name: update-transfers
        uses: gcatanese/push-to-postman-action@main
        with:
          goal: update
          postman-key: ${{ secrets.POSTMAN_API_KEY }}
          postman-file: 'postman/TransferService-v4.json'
          collection-id: '8426282-959dfdf2-5a52-4f9f-86c6-db3743d43313'   
