-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.08 KB
/
cd-oidc.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
51
52
53
54
name: OIDC CD
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CD_ROLE_ARN }}
role-session-name: ${{ github.sha }}
aws-region: eu-central-1
- name: Create Outputs Directory
run: mkdir -p terraform/outputs
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.3'
- name: Build Go
run: make build_go
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build Node
run: make build_node
- name: Write env variables to file
run: |
echo '${{ secrets.ENV_FILE }}' > env.json
- name: Run Terraform
run: |
cd terraform
terraform init
terraform apply -auto-approve