-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 953 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build Image
on:
workflow_run:
workflows: ["Run Tests"]
types:
- completed
env:
BASE_REGISTRY: ${{ secrets.BASE_REGISTRY }}
REGISTRY: '${{ secrets.BASE_REGISTRY }}/sro'
permissions:
id-token: write
contents: read
jobs:
deploy:
if: |
github.event.workflow_run.conclusion == 'success' && contains('
refs/heads/main
', github.ref)
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::779965382548:role/SRO_GitHub_Go-Backend_Production
role-session-name: sroawsdeploy
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to registry
id: build-image
run: make push -j