File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1414 strategy :
1515 matrix :
1616 env : [dev, prod, test]
17- build :
18- name : Build
19- secrets : inherit
20- uses : ./.github/workflows/build.yml
21- with :
22- env : ${{ matrix.env }}
17+ name : Build Docker
18+ runs-on : ubuntu-latest
19+ environment : ${{ matrix.env }}
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v6
23+ with :
24+ ref : ${{ github.ref }}
25+
26+ - name : Configure AWS Credentials
27+ uses : aws-actions/configure-aws-credentials@v5
28+ with :
29+ aws-region : ' ap-southeast-2'
30+ role-to-assume : arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/github-nuj-repository-access
31+ role-session-name : NujPlatformAPISession
32+
33+ - name : Login to Amazon ECR
34+ id : login-ecr
35+ uses : aws-actions/amazon-ecr-login@v2
36+
37+ - name : Build, tag, and push the image to Amazon ECR
38+ id : build-image
39+ env :
40+ ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
41+ ECR_REPOSITORY : ' ssh_bastion'
42+ IMAGE_TAG : latest
43+ run : |
44+ docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:latest -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ github.sha }} -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ github.ref_name }} .
45+ docker push $ECR_REGISTRY/$ECR_REPOSITORY --all-tags
You can’t perform that action at this time.
0 commit comments