PYIC-8942: Upgrade frontend-ui package (#2832) #181
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: SecurePipeline Docker build, ECR push, template copy to S3 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.test.ts' | |
| - 'browser-tests/**' | |
| - 'dev-deploy/**' | |
| - 'src/test-utils/**' | |
| workflow_dispatch: | |
| jobs: | |
| # Re-run the automated tests now that the merge has happened. | |
| automatedTests: | |
| uses: ./.github/workflows/automated-tests.yaml | |
| secrets: | |
| DYNATRACE_PAAS_TOKEN: ${{ secrets.DYNATRACE_PAAS_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| dockerBuildAndPush: | |
| name: Docker build and push | |
| needs: automatedTests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| AWS_REGION: eu-west-2 | |
| ENVIRONMENT: ${{ github.event_name == 'workflow_dispatch' && 'dev01' || 'build' }} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| packages: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: '0' | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Setup .npmrc | |
| run: | | |
| cp .npmrc.template .npmrc && \ | |
| sed -i s/TOKEN_WITH_READ_PACKAGE_PERMISSION/${{ secrets.GITHUB_TOKEN }}/ .npmrc | |
| - name: Set up AWS creds #push to ECR and do sam deploy | |
| uses: aws-actions/configure-aws-credentials@v5 | |
| with: | |
| role-to-assume: ${{ env.ENVIRONMENT == 'build' && secrets.GH_ACTIONS_ROLE_ARN || secrets.GH_ACTIONS_ROLE_ARN_DEV }} | |
| aws-region: eu-west-2 | |
| - name: Login to Amazon ECR | |
| id: login-ecr | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| - name: Login to GDS Dev Dynatrace Container Registry | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 | |
| with: | |
| registry: khw46367.live.dynatrace.com | |
| username: khw46367 | |
| password: ${{ secrets.DYNATRACE_PAAS_TOKEN }} | |
| - name: Deploy SAM app to ECR | |
| uses: govuk-one-login/devplatform-upload-action-ecr@v1.5.0 | |
| with: | |
| artifact-bucket-name: ${{ env.ENVIRONMENT == 'build' && secrets.ARTIFACT_BUCKET_NAME || secrets.ARTIFACT_BUCKET_NAME_DEV }} | |
| container-sign-kms-key-arn: ${{ env.ENVIRONMENT == 'build' && secrets.CONTAINER_SIGN_KMS_KEY || secrets.CONTAINER_SIGN_KMS_KEY_DEV }} | |
| working-directory: ./deploy | |
| docker-build-path: . | |
| template-file: template.yaml | |
| role-to-assume-arn: ${{ env.ENVIRONMENT == 'build' && secrets.GH_ACTIONS_ROLE_ARN || secrets.GH_ACTIONS_ROLE_ARN_DEV }} | |
| ecr-repo-name: ${{ env.ENVIRONMENT == 'build' && secrets.ECR_REPOSITORY || secrets.ECR_REPOSITORY_DEV }} | |
| checkout-repo: false |