|
12 | 12 |
|
13 | 13 | - name: black
|
14 | 14 | uses: psf/black@stable
|
15 |
| - |
16 |
| - - name: Configure AWS credentials |
17 |
| - uses: aws-actions/configure-aws-credentials@v1-node16 |
18 |
| - with: |
19 |
| - role-to-assume: arn:aws:iam::200049542062:role/go_capture/GithubRole |
20 |
| - aws-region: us-west-1 |
21 |
| - |
22 |
| - - name: Set ECR Stack Name |
23 |
| - id: ecr-stack-name |
24 |
| - run: echo ECR_STACK_NAME=GoCaptureECR >> $GITHUB_OUTPUT |
25 |
| - |
26 |
| - - name: Deploy ECR repository |
27 |
| - uses: aws-actions/aws-cloudformation-github-deploy@v1 |
28 |
| - with: |
29 |
| - name: ${{ steps.ecr-stack-name.outputs.ECR_STACK_NAME }} |
30 |
| - template: cloud-formation/ecr.yaml |
31 |
| - no-fail-on-empty-changeset: 1 |
32 |
| - |
33 |
| - - name: Beta Deploy User |
34 |
| - uses: aws-actions/aws-cloudformation-github-deploy@v1 |
35 |
| - with: |
36 |
| - name: GoCaptureBetaDeployUser |
37 |
| - template: cloud-formation/beta-deploy-user.yaml |
38 |
| - parameter-overrides: EcrStackName=${{ steps.ecr-stack-name.outputs.ECR_STACK_NAME }} |
39 |
| - capabilities: CAPABILITY_NAMED_IAM |
40 |
| - no-fail-on-empty-changeset: 1 |
41 |
| - |
42 |
| - - name: Login to Amazon ECR |
43 |
| - id: login-ecr |
44 |
| - uses: aws-actions/amazon-ecr-login@v1 |
45 |
| - |
46 |
| - - name: Build, tag, and push docker image to Amazon ECR |
47 |
| - env: |
48 |
| - BRANCH_NAME: ${{ github.ref_name }} |
49 |
| - REGISTRY: ${{ steps.login-ecr.outputs.registry }} |
50 |
| - REPOSITORY: go-capture |
51 |
| - IMAGE_TAG: ${{ github.sha }} |
52 |
| - run: | |
53 |
| - docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG . |
54 |
| - if [ $BRANCH_NAME = main ] |
55 |
| - then |
56 |
| - docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG |
57 |
| - fi |
0 commit comments