From c3dafefde80c7c4900b7de930ddfccb7c2217f58 Mon Sep 17 00:00:00 2001 From: Aleksandr Molchagin <47938394+AleksandrMolchagin@users.noreply.github.com> Date: Thu, 9 Jan 2025 01:10:40 -0500 Subject: [PATCH] Create postman.yml --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8a90897 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Update Postman Collection on Push + +on: + push: + branches: + - sandbox # Trigger on pushes to the main branch + +jobs: + update-postman: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Update Postman Collection + env: + POSTMAN_API_KEY: ${{ secrets.POSTMAN_KEY }} + run: | + # Set variables + COLLECTION_ID="salesforce-data-api" # Replace with your Postman collection ID + COLLECTION_FILE="docs/Scores - Salesforce Data API.postman_collection.json" # Replace with the relative path to your collection + + # Update Postman Collection via API + curl --location --request PUT "https://api.getpostman.com/collections/$COLLECTION_ID" \ + --header "X-Api-Key: $POSTMAN_API_KEY" \ + --header "Content-Type: application/json" \ + --data @"$COLLECTION_FILE"