diff --git a/.github/workflows/newman.yml b/.github/workflows/newman.yml index 99e41bb..aff7893 100644 --- a/.github/workflows/newman.yml +++ b/.github/workflows/newman.yml @@ -13,11 +13,20 @@ jobs: test: runs-on: ubuntu-latest steps: + - name: Setup (1) + uses: actions/checkout@v3 + with: + repository: Mastercard/finicity-openapi + - name: Setup (2) + id: setup + run: | + customer_id=$(./bin/setup.sh ${{ secrets.PARTNER_ID }} ${{ secrets.PARTNER_SECRET }} ${{ secrets.APP_KEY }} --no-interaction | grep -oP '(?<=CUSTOMER_ID: )\d+') + echo "customer_id=$customer_id" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 - name: Newman uses: matt-ball/newman-action@v1.0.4 with: - envVar: '[{ "key": "appKey", "value": "${{ secrets.APP_KEY }}" }, { "key": "partnerId", "value": "${{ secrets.PARTNER_ID }}" }, { "key": "partnerSecret", "value": "${{ secrets.PARTNER_SECRET }}" }, { "key": "customerId", "value": "${{ secrets.CUSTOMER_ID }}" } ]' + envVar: '[{ "key": "appKey", "value": "${{ secrets.APP_KEY }}" }, { "key": "partnerId", "value": "${{ secrets.PARTNER_ID }}" }, { "key": "partnerSecret", "value": "${{ secrets.PARTNER_SECRET }}" }, { "key": "customerId", "value": "${{ env.customer_id }}" } ]' collection: finicity.postman_collection.json folder: '[ "All APIs" ]' \ No newline at end of file diff --git a/README.md b/README.md index 690a7e6..67f1d54 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ The following workflow runs the collection and ensures it can be used to consume 1. [Fork this repository](https://github.com/Mastercard/finicity-postman/fork) 2. Go to _Settings_ > _Secrets_ > _Actions_ -3. Create new repository secrets: `PARTNER_ID`, `PARTNER_SECRET`, `APP_KEY` and `CUSTOMER_ID` +3. Create new repository secrets: `PARTNER_ID`, `PARTNER_SECRET` and `APP_KEY` 4. Enable workflows in the _Actions_ tab 5. Click _Run workflow_ under _Newman_. Expected result: :heavy_check_mark: