Skip to content

Commit

Permalink
infra: update build order
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenkhavi committed Dec 22, 2023
1 parent e28c9fa commit 1497c58
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Development
on:
# push:
# branches:
# - main
push:
branches:
- main
workflow_dispatch:
concurrency: development
env:
Expand All @@ -15,7 +15,26 @@ env:
BUILD_SOURCE_VERSION: ${{ github.sha }}

jobs:
build_asset:
name: Build Asset
runs-on: ubuntu-latest
environment: Development
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE }}
- name: Build, tag, and push image to Amazon ECR
working-directory: .
run: |
yarn
yarn nx run-many -t build --all
iam_deploy:
needs: build_asset
name: Deploy IAM Task execution Role Development
runs-on: ubuntu-latest
environment: Development
Expand Down Expand Up @@ -45,26 +64,8 @@ jobs:
working-directory: infra
run: |
yarn cdk:deploy:iam-stack
build_asset:
name: Build Asset
runs-on: ubuntu-latest
environment: Development
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE }}
- name: Build, tag, and push image to Amazon ECR
working-directory: .
run: |
yarn
yarn nx run-many -t build --all
lambda_deploy:
needs: [build_asset, iam_deploy]
needs: [iam_deploy]
name: Deploy Lambda
runs-on: ubuntu-latest
environment: Development
Expand Down

0 comments on commit 1497c58

Please sign in to comment.