Skip to content

Init

Init #1

Workflow file for this run

permissions:
contents: read
id-token: write
on:
push:
branches:
- main
concurrency:
group: prod
cancel-in-progress: false
name: prod
jobs:
build:
runs-on: ubuntu-latest
environment: prod
env:
SERVICE: ${{ vars.SERVICE }}
STAGE: prod
CDK_DEFAULT_REGION: ${{ vars.CDK_DEFAULT_REGION }}
CDK_DEFAULT_ACCOUNT: ${{ vars.CDK_DEFAULT_ACCOUNT }}
TAG: ${{ github.sha }}
name: build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.100
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::${{ env.CDK_DEFAULT_ACCOUNT }}:role/github-actions
role-duration-seconds: 900
aws-region: ${{ env.CDK_DEFAULT_REGION }}
- name: Run cdk deploy ecr stack
run: npx cdk deploy ${{ env.SERVICE }}-${{ env.STAGE }}-ecr --require-approval never
- name: Run login to aws ecr
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
mask-password: "true"
- run: |
npm run build
npm run push
- name: Run cdk deploy app stack
run: npx cdk deploy ${{ env.SERVICE }}-${{ env.STAGE }}-app --require-approval never
- run: npm run e2e