Reinstated sonar checks (#515) #327
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
name: Frontend Build and Deploy - Dev | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./ | |
jobs: | |
dockerBuildAndPush: | |
name: Docker build and push | |
runs-on: ubuntu-latest | |
env: | |
AWS_REGION: eu-west-2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up AWS creds | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.DEV_ROLE_TO_ASSUME }} | |
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@v3 | |
with: | |
registry: khw46367.live.dynatrace.com | |
username: khw46367 | |
password: ${{ secrets.DYNATRACE_PAAS_TOKEN }} | |
- name: Deploy SAM app to ECR | |
uses: govuk-one-login/[email protected] | |
with: | |
artifact-bucket-name: ${{ secrets.DEV_ARTIFACT_BUCKET }} | |
container-sign-kms-key-arn: ${{ secrets.DEV_CONTAINER_SIGN_KMS_KEY }} | |
working-directory: . | |
docker-build-path: . | |
template-file: template.yaml | |
dockerfile: dev.Dockerfile | |
role-to-assume-arn: ${{ secrets.DEV_ROLE_TO_ASSUME }} | |
ecr-repo-name: ${{ secrets.DEV_ECR_REPOSITORY }} |