Update postman_Newman.yml #11
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
name: Trigger Postman Monitor | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
api-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Trigger Postman Monitor | |
id: trigger_monitor | |
run: | | |
# Trigger the Postman Monitor and save the response as JSON | |
curl --request POST \ | |
--url https://api.getpostman.com/monitors/${{ secrets.POSTMAN_MONITOR_ID }}/run \ | |
--header "X-Api-Key: ${{ secrets.POSTMAN_API_KEY }}" \ | |
--header "Content-Type: application/json" \ | |
--output result.json | |
- name: Upload results as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: postman-monitor-results | |
path: result.json |