-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #314 from AmericaSCORESBayArea/postman-collection-…
…autoupdate Create postman.yml
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |