From 3d1f408f27158eaf7652084d0fe8987066ed3a7d Mon Sep 17 00:00:00 2001 From: Matt Ball Date: Wed, 28 Aug 2019 21:55:47 -0700 Subject: [PATCH] Update README.md --- README.md | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5a71861b7..32c23ee1d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,36 @@ -# JavaScript Action Template +# Newman Action -This template offers an easy way to get started writing a JavaScript action with TypeScript compile time support, unit testing with Jest and using the GitHub Actions Toolkit. +Allows you to run Postman's headless collction runner, Newman, via a GitHub Action meaning no config of the Newman lib itself. ## Getting Started -See the walkthrough located [here](https://github.com/actions/toolkit/blob/master/docs/javascript-action.md). +Currently this action only works via retrieving your collection/environment through [Postman's API](https://docs.api.getpostman.com/?version=latest). The API docs contain endpoints that will allow you to retrieve these IDs. Therefore you'll need to pass: -In addition to walking your through how to create an action, it also provides strategies for versioning, releasing and referencing your actions. +- Your [Postman API key](https://docs.api.getpostman.com/?version=latest#authentication) +- The collection ID +- The environment ID + +## Example workflow file + +This yml file should be located in `.github/workflows` + +``` +name: Newman Run + +on: + pull_request: + branches: + - master + +jobs: + newman: + runs-on: ubuntu-latest + steps: + - uses: matt-ball/newman-action@0.0.21 + with: + postmanApiKey: ${{ secrets.postmanApiKey }} + collection: 5922408-c22ef764-b464-424c-8702-750343478723 + environment: 5922408-228c7edd-fc15-4f68-9665-a35d7df6945b +``` + +See [Workflow syntax for GitHub Actions](https://help.github.com/en/articles/workflow-syntax-for-github-actions) for more.