Skip to content

Update postman_Newman.yml #11

Update postman_Newman.yml

Update postman_Newman.yml #11

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