chore(deps): bump axios in /smartbearcoin-payments-ui #128
Workflow file for this run
This file contains hidden or 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: ConsumerCI | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| application_name: | |
| description: name of consumer | |
| required: true | |
| default: 'SmartBearCoin-Payments-UI' | |
| provider_name: | |
| description: name of provider | |
| required: true | |
| default: 'SmartBearCoin-Payee-Provider' | |
| demo_deploy: | |
| description: skip deployment steps for demo | |
| required: true | |
| default: 'false' | |
| push: | |
| paths: | |
| - 'smartbearcoin-payments-ui/**' | |
| - '.github/workflows/ConsumerCI.yml' | |
| - 'oas/**' | |
| pull_request: | |
| branches: ['main'] | |
| paths: | |
| - 'smartbearcoin-payments-ui/**' | |
| - '.github/workflows/ConsumerCI.yml' | |
| - 'oas/**' | |
| env: | |
| version: ${{ github.sha }} | |
| application_folder: smartbearcoin-payments-ui | |
| 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 }} | |
| test: | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| env: | |
| PACT_CONSUMER: ${{ needs.setup.outputs.PACT_CONSUMER }} | |
| PACT_PROVIDER: ${{ needs.setup.outputs.PACT_PROVIDER }} | |
| steps: | |
| - 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/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: | |
| needs: [setup, test] | |
| runs-on: ubuntu-latest | |
| env: | |
| deploy_target: acceptance | |
| steps: | |
| - 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 }} | |
| can-i-deploy-to-production: | |
| needs: [setup, test] | |
| runs-on: ubuntu-latest | |
| env: | |
| deploy_target: production | |
| steps: | |
| - 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 }} | |
| deploy-to-acc: | |
| if: github.ref == 'refs/heads/main' | |
| needs: [setup, can-i-deploy-to-acc] | |
| runs-on: ubuntu-latest | |
| env: | |
| deploy_target: acceptance | |
| REACT_APP_API_BASE_URL: https://sbdevrel-fua-smartbearcoin-acc1.azurewebsites.net/api | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| - name: Build site | |
| run: | | |
| cd ${{ env.application_folder }} | |
| npm ci | |
| npm run build | |
| - name: Deploy website to ${{ env.deploy_target }} environment | |
| uses: nwtgck/actions-netlify@v1.2 | |
| with: | |
| publish-dir: './${{ env.application_folder }}/build' | |
| alias: ${{ env.deploy_target }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: 'Deploy from GitHub Actions' | |
| enable-pull-request-comment: false | |
| enable-commit-comment: true | |
| overwrites-pull-request-comment: true | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| timeout-minutes: 1 | |
| - 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 }} | |
| deploy-to-production: | |
| if: github.ref == 'refs/heads/main' | |
| needs: [setup, can-i-deploy-to-production, deploy-to-acc] | |
| runs-on: ubuntu-latest | |
| env: | |
| deploy_target: production | |
| REACT_APP_API_BASE_URL: https://sbdevrel-fua-smartbearcoin-prd1.azurewebsites.net/api | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| - name: Build site | |
| run: | | |
| cd ${{ env.application_folder }} | |
| npm ci | |
| npm run build | |
| - name: Deploy website to ${{ env.deploy_target }} environment | |
| uses: nwtgck/actions-netlify@v1.2 | |
| with: | |
| publish-dir: './${{ env.application_folder }}/build' | |
| production-branch: main | |
| production-deploy: true | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: 'Deploy from GitHub Actions' | |
| enable-pull-request-comment: false | |
| enable-commit-comment: true | |
| overwrites-pull-request-comment: true | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| timeout-minutes: 1 | |
| - 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 }} |