Skip to content

Commit

Permalink
chore(deps): update consumer and actions to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Oct 22, 2024
1 parent 6291617 commit cbf9bc4
Show file tree
Hide file tree
Showing 8 changed files with 6,137 additions and 10,617 deletions.
62 changes: 35 additions & 27 deletions .github/workflows/ConsumerCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand All @@ -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 }}

Expand All @@ -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 }}

Expand All @@ -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 }}
Expand All @@ -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 }}

Expand All @@ -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 }}
Expand All @@ -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 }}
27 changes: 14 additions & 13 deletions .github/workflows/DesignInsight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/Portal-Docs-Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Iterate over product folders
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ProviderCI-Infra-and-Code-Only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:

# check out code
- uses: actions/checkout@main
- uses: actions/checkout@v4

# login to Azure
- uses: azure/login@v1
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
steps:

# check out code
- uses: actions/checkout@main
- uses: actions/checkout@v4

# login to Azure
- uses: azure/login@v1
Expand All @@ -77,7 +77,7 @@ jobs:
steps:
# check out code
- name: 'Checkout code'
uses: actions/checkout@main
uses: actions/checkout@v4

# login to Azure
- uses: azure/login@v1
Expand All @@ -99,7 +99,7 @@ jobs:

# setup donet environments
- name: Setup DotNet Environments
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
steps:
# check out code
- name: 'Checkout code'
uses: actions/checkout@main
uses: actions/checkout@v4

# login to Azure
- uses: azure/login@v1
Expand All @@ -153,7 +153,7 @@ jobs:

# setup donet environments
- name: Setup DotNet Environments
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
Expand Down
Loading

0 comments on commit cbf9bc4

Please sign in to comment.