Parameterize Mayhem URL to ensure mAPI CLI matches Mayhem platform (#… #862
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: 'build-test' | |
on: | |
push | |
jobs: | |
build: # make sure build/ci work properly | |
runs-on: ubuntu-latest | |
env: | |
MAYHEM_TOKEN: ${{ secrets.MAYHEM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# fetch entire history to compute diffs between jobs | |
fetch-depth: 0 | |
- run: | | |
npm install | |
- run: | | |
npm run all | |
test: # make sure the action works on a clean machine without building | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# fetch entire history to compute diffs between jobs | |
fetch-depth: 0 | |
- uses: ./ | |
continue-on-error: true | |
with: | |
mayhem-token: ${{ secrets.MAYHEM_TOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
mayhem-url: https://app.mayhem.security | |
api-url: https://demo-api.mayhem4api.forallsecure.com/api/v3 | |
api-spec: https://demo-api.mayhem4api.forallsecure.com/api/v3/openapi.json | |
html-report: mapi.html | |
zap-api-scan: true | |
run-args: | | |
--warnaserror | |
--junit | |
junit.xml | |
- name: Archive HTML report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mapi-report | |
path: mapi.html | |
- name: Archive JUnit results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mapi-junit | |
path: junit.xml |