-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLAT-4150: update ecs stack to v2.0.2
- Loading branch information
Showing
2 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: SecurePipeline Docker build, ECR push, template copy to S3 | ||
on: | ||
push: | ||
branches: | ||
- PLAT-4150 | ||
|
||
jobs: | ||
dockerBuildAndPush: | ||
name: Docker build and push | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
env: | ||
AWS_REGION: eu-west-2 | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
|
||
# - name: Set up AWS creds #push assets to S3 | ||
# uses: aws-actions/configure-aws-credentials@v2 | ||
# with: | ||
# role-to-assume: ${{ secrets.UPLOAD_ASSETS_GH_ACTIONS_ROLE_ARN }} | ||
# aws-region: eu-west-2 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
# - name: npm build assets, zip and sign | ||
# uses: govuk-one-login/github-actions/govuk/upload-assets@main | ||
# with: | ||
# signing-key-arn: ${{ secrets.UPLOAD_ASSETS_ZIP_SIGNING_KEY }} | ||
# stack-name: 'core-front' | ||
# destination-bucket-name: ${{ secrets.UPLOAD_ASSETS_ARTIFACT_SOURCE_BUCKET_NAME }} | ||
|
||
- name: Set up AWS creds #push to ECR and do sam deploy | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CANARY_GH_ACTIONS_ROLE_ARN }} | ||
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.CANARY_ARTIFACT_BUCKET_NAME }} | ||
container-sign-kms-key-arn: ${{ secrets.CANARY_CONTAINER_SIGN_KMS_KEY }} | ||
working-directory: ./deploy | ||
docker-build-path: . | ||
template-file: template.yaml | ||
role-to-assume-arn: ${{ secrets.CANARY_GH_ACTIONS_ROLE_ARN }} | ||
ecr-repo-name: ${{ secrets.CANARY_ECR_REPOSITORY}} |
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