-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update consumer and actions to latest
- Loading branch information
Showing
8 changed files
with
6,137 additions
and
10,617 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,21 +29,19 @@ on: | |
|
||
env: | ||
version: ${{ github.sha }} | ||
PACT_BROKER_BASE_URL: https://smartbear.pactflow.io | ||
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} | ||
application_folder: smartbearcoin-payments-ui | ||
application_name: ${{ github.event.inputs.application_name }} | ||
application_name_default: SmartBearCoin-Payments-UI | ||
provider_name: ${{ github.event.inputs.provider_name }} | ||
provider_name_default: SmartBearCoin-Payee-Provider | ||
|
||
jobs: | ||
setup: | ||
name: 🏗️ setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "application_name=${application_name:-${application_name_default}}" >> $GITHUB_ENV | ||
- run: echo "provider_name=${provider_name:-${provider_name_default}}" >> $GITHUB_ENV | ||
env: | ||
application_name: ${{ github.event.inputs.application_name }} | ||
application_name_default: SmartBearCoin-Payments-UI | ||
provider_name: ${{ github.event.inputs.provider_name }} | ||
provider_name_default: SmartBearCoin-Payee-Provider | ||
outputs: | ||
PACT_CONSUMER: ${{ env.application_name }} | ||
PACT_PROVIDER: ${{ env.provider_name }} | ||
|
@@ -55,12 +53,14 @@ jobs: | |
PACT_CONSUMER: ${{ needs.setup.outputs.PACT_CONSUMER }} | ||
PACT_PROVIDER: ${{ needs.setup.outputs.PACT_PROVIDER }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- run: cd ${{ env.application_folder }} && npm ci | ||
- run: cd ${{ env.application_folder }} && npm test | ||
- uses: pactflow/actions/[email protected] | ||
env: | ||
- uses: pactflow/actions/publish-pact-files@v2 | ||
with: | ||
broker_url: https://smartbear.pactflow.io | ||
token: ${{ secrets.PACT_BROKER_TOKEN }} | ||
pactfiles: ${{ env.application_folder }}/pacts | ||
|
||
can-i-deploy-to-acc: | ||
|
@@ -69,9 +69,11 @@ jobs: | |
env: | ||
deploy_target: acceptance | ||
steps: | ||
- name: can-i-deploy ${{ env.application_name }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/[email protected] | ||
env: | ||
- name: can-i-deploy ${{ needs.setup.outputs.PACT_CONSUMER }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/can-i-deploy@v2 | ||
with: | ||
broker_url: https://smartbear.pactflow.io | ||
token: ${{ secrets.PACT_BROKER_TOKEN }} | ||
to_environment: ${{ env.deploy_target }} | ||
application_name: ${{ needs.setup.outputs.PACT_CONSUMER }} | ||
|
||
|
@@ -81,9 +83,11 @@ jobs: | |
env: | ||
deploy_target: production | ||
steps: | ||
- name: can-i-deploy ${{ env.application_name }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/[email protected] | ||
env: | ||
- name: can-i-deploy ${{ needs.setup.outputs.PACT_CONSUMER }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/can-i-deploy@v2 | ||
with: | ||
broker_url: https://smartbear.pactflow.io | ||
token: ${{ secrets.PACT_BROKER_TOKEN }} | ||
to_environment: ${{ env.deploy_target }} | ||
application_name: ${{ needs.setup.outputs.PACT_CONSUMER }} | ||
|
||
|
@@ -95,8 +99,8 @@ jobs: | |
deploy_target: acceptance | ||
REACT_APP_API_BASE_URL: https://sbdevrel-fua-smartbearcoin-acc.azurewebsites.net/api | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Build site | ||
run: | | ||
cd ${{ env.application_folder }} | ||
|
@@ -116,9 +120,11 @@ jobs: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 1 | ||
- name: record-deployment ${{ env.application_name }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/[email protected] | ||
env: | ||
- name: record-deployment ${{ needs.setup.outputs.PACT_CONSUMER }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/record-deployment@v2 | ||
with: | ||
broker_url: https://smartbear.pactflow.io | ||
token: ${{ secrets.PACT_BROKER_TOKEN }} | ||
environment: ${{ env.deploy_target }} | ||
application_name: ${{ needs.setup.outputs.PACT_CONSUMER }} | ||
|
||
|
@@ -130,8 +136,8 @@ jobs: | |
deploy_target: production | ||
REACT_APP_API_BASE_URL: https://sbdevrel-fua-smartbearcoin-prd.azurewebsites.net/api | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Build site | ||
run: | | ||
cd ${{ env.application_folder }} | ||
|
@@ -152,8 +158,10 @@ jobs: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 1 | ||
- name: record-deployment ${{ env.application_name }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/[email protected] | ||
env: | ||
- name: record-deployment ${{ needs.setup.outputs.PACT_CONSUMER }} to ${{ env.deploy_target }} | ||
uses: pactflow/actions/record-deployment@v2 | ||
with: | ||
broker_url: https://smartbear.pactflow.io | ||
token: ${{ secrets.PACT_BROKER_TOKEN }} | ||
environment: ${{ env.deploy_target }} | ||
application_name: ${{ needs.setup.outputs.PACT_CONSUMER }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,16 +15,11 @@ on: | |
- 'oas/**' | ||
workflow_dispatch: | ||
|
||
env: | ||
application_name: SmartBearCoin-Payee-Provider | ||
PACT_BROKER_BASE_URL: https://smartbear.pactflow.io | ||
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }} | ||
|
||
jobs: | ||
pact-publish-oas-action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: get version of OAS | ||
run: | | ||
sudo snap install yq | ||
|
@@ -33,10 +28,13 @@ jobs: | |
- name: merge openapi spec | ||
run: | | ||
npx -y oas-merge ./oas/openapi.yaml | ||
- uses: pactflow/actions/[email protected] | ||
env: | ||
oas_file: oas/openapi-transformed.json | ||
results_file: oas/openapi-transformed.json | ||
- uses: pactflow/actions/publish-provider-contract@v2 | ||
with: | ||
broker_url: https://smartbear.pactflow.io | ||
token: ${{ secrets.PACT_BROKER_TOKEN }} | ||
application_name: SmartBearCoin-Payee-Provider | ||
contract: oas/openapi-transformed.json | ||
verification_results: oas/openapi-transformed.json | ||
outputs: | ||
version: ${{ env.version }} | ||
|
||
|
@@ -48,8 +46,11 @@ jobs: | |
needs: pact-publish-oas-action | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: can-i-deploy ${{ env.application_name }} to ${{ matrix.environment }} | ||
uses: pactflow/actions/[email protected] | ||
env: | ||
- name: can-i-deploy SmartBearCoin-Payee-Provider to ${{ matrix.environment }} | ||
uses: pactflow/actions/can-i-deploy@v2 | ||
with: | ||
broker_url: https://smartbear.pactflow.io | ||
token: ${{ secrets.PACT_BROKER_TOKEN }} | ||
application_name: SmartBearCoin-Payee-Provider | ||
to_environment: ${{ matrix.environment }} | ||
version: ${{ needs.pact-publish-oas-action.outputs.version }} |
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
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
Oops, something went wrong.