Merge pull request #524 from govuk-one-login/idsre-to-rex #255
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: BUILD Post merge, deploy Docker build, ECR push, template copy to S3 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| development: | |
| runs-on: ubuntu-latest | |
| name: Build docker build and push | |
| env: | |
| AWS_REGION: eu-west-2 | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: "0" | |
| - 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: SAM Validate | |
| run: sam validate --region ${{ env.AWS_REGION }} -t deploy/template.yaml | |
| - name: "Push signed image to ECR, updated SAM template with image then upload it to the S3 Artifact Bucket" | |
| uses: govuk-one-login/devplatform-upload-action-ecr@v1.4.0 | |
| with: | |
| artifact-bucket-name: ${{ secrets.BUILD_ARTIFACT_BUCKET_NAME }} | |
| container-sign-kms-key-arn: ${{ secrets.BUILD_CONTAINER_SIGN_KMS_KEY }} | |
| working-directory: . | |
| template-file: deploy/template.yaml | |
| docker-build-path: . | |
| role-to-assume-arn: ${{ secrets.BUILD_GH_ACTIONS_ROLE_ARN }} | |
| ecr-repo-name: ${{ secrets.BUILD_ECR_NAME_FRONT }} |