-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.31 KB
/
pipeline_deploy_batch.yml
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
43
44
45
46
47
48
49
50
name: Pipeline de Deploy Batch
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: "arn:aws:iam::340752815603:role/oidc-github-framework-eml-role"
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.0
- name: Create ECR
run: |
chmod +x deployment/scripts/create_ecr.sh
./deployment/scripts/create_ecr.sh ${{ env.REPO_NAME }} ${{ env.AWS_REGION }}
- name: Build and push image
run: |
chmod +x deployment/scripts/push_image.sh
./deployment/scripts/push_image.sh ${{ env.REPO_NAME }} ${{ env.AWS_REGION }}
- name: Create infra and deploy
run: |
chmod +x deployment/scripts/create_infra.sh
./deployment/scripts/create_infra.sh ${{ env.AWS_REGION }}
env:
REPO_NAME: "eml-batch-repo"
AWS_REGION: "us-east-1"