Run Postman CLI commands in your CI/CD workflows using GitHub Actions
With the Postman CLI GitHub Action, you can run Postman CLI commands directly in your GitHub CI/CD workflows, without creating and maintaining custom actions. The action supports collection runs, monitors, syntax checks, governance validation, and more. By catching regressions and configuration issues early, you can confidently decide whether to proceed with or roll back a deployment.
To learn more about the Postman CLI GitHub Action, see the GitHub Marketplace.
Use the Postman CLI GitHub Action
Specify the Postman CLI commands you’d like to run in your CI/CD workflows. For each command, you can customize inputs to suit your API project, such as the Postman CLI version. Each command returns an exit code output you can use to check whether the results succeeded or failed.
The Postman CLI GitHub Action accepts the following inputs:
The Postman CLI commands return the following outputs:
Run collections
A collection is a set of API requests, a workflow, or a test suite. You can use the Postman CLI to run HTTP collections and send the run results to the Postman cloud. Learn more about collections.
Learn more about the collection run options you can use to configure the command.
Run monitors
Monitors enable you to regularly check the health and performance of your APIs. You can use the Postman CLI to trigger monitor runs and send the run results to the Postman cloud. You can learn more about configuring a monitor for your CI/CD workflow.
Learn more about the monitor run options you can use to configure the command.
Validate specifications in Spec Hub
Run syntax validation and governance rule checks against API specifications in Spec Hub. The command is supported for API specifications in OpenAPI 2.0, 3.0, or 3.1 format.
Learn more about the specification validation options you can use to configure the command.
Validate specifications in the API Builder
Run syntax validation and governance rule checks against API specifications in the Postman API Builder.
Learn more about the API validation options you can use to configure the command.