-
Notifications
You must be signed in to change notification settings - Fork 12
53 lines (43 loc) · 1.29 KB
/
build-and-deploy.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
name: Build and Deploy
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: SlideRule Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
apt-get update -y
apt-get install -y curl unzip
curl -O https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip
unzip ./awscli-exe-linux-$(arch).zip && ./aws/install
- name: Checkout SlideRule Repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::742127912612:role/GitHubAction-AssumeRoleWithAction
aws-region: aws-region-1
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Upload Terraform
run: |
cd targets/slidruleearth-aws
make cluster-upload-terraform
- name: Build Containers
run: |
cd targets/slidruleearth-aws
make BUILDX=buildx DOCKER_PLATFORM=linux/arm64 cluster-docker
- name: Push containers
run: |
cd targets/slidruleearth-aws
make cluster-docker-push
# - name: Build AMI
# run: |
# cd targets/slidruleearth-aws
# make cluster-build-packer