-
Notifications
You must be signed in to change notification settings - Fork 51
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 #119 from docusign/add-actions
Added the GitHub actions for the CLM and Notary collections
- Loading branch information
Showing
2 changed files
with
74 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,37 @@ | ||
name: Sync CLM Postman Collection | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # Change this to the branch you want to trigger the action | ||
paths: | ||
- 'assets/clm-collection.json' | ||
|
||
jobs: | ||
update-postman: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update CLM Postman Collection | ||
env: | ||
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} | ||
run: | | ||
# Run the Postman API to update the collection | ||
GITHUB_COLLECTION_PATH="./assets/clm-collection.json" | ||
COLLECTION_UID=${{ vars.CLM_COLLECTION_UID }} | ||
# Read the file content and wrap it inside a collection object | ||
WRAPPED_CONTENT=$(jq -n --argfile data "$GITHUB_COLLECTION_PATH" '{"collection": $data}') | ||
# Write the wrapped content to a temporary file | ||
echo "$WRAPPED_CONTENT" > wrapped_collection.json | ||
# Use curl with --data-binary to handle large file content | ||
curl --location --request PUT "https://api.getpostman.com/collections/$COLLECTION_UID" \ | ||
--header "x-api-key: $POSTMAN_API_KEY" \ | ||
--header "Content-Type: application/json" \ | ||
--data-binary @wrapped_collection.json |
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,37 @@ | ||
name: Sync Notary Postman Collection | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # Change this to the branch you want to trigger the action | ||
paths: | ||
- 'assets/notary-collection.json' | ||
|
||
jobs: | ||
update-postman: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update Notary Postman Collection | ||
env: | ||
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} | ||
run: | | ||
# Run the Postman API to update the collection | ||
GITHUB_COLLECTION_PATH="./assets/notary-collection.json" | ||
COLLECTION_UID=${{ vars.NOTARY_COLLECTION_UID }} | ||
# Read the file content and wrap it inside a collection object | ||
WRAPPED_CONTENT=$(jq -n --argfile data "$GITHUB_COLLECTION_PATH" '{"collection": $data}') | ||
# Write the wrapped content to a temporary file | ||
echo "$WRAPPED_CONTENT" > wrapped_collection.json | ||
# Use curl with --data-binary to handle large file content | ||
curl --location --request PUT "https://api.getpostman.com/collections/$COLLECTION_UID" \ | ||
--header "x-api-key: $POSTMAN_API_KEY" \ | ||
--header "Content-Type: application/json" \ | ||
--data-binary @wrapped_collection.json |