-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (46 loc) · 1.62 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
54
55
56
name: Build and Deploy
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
build:
name: SlideRule Build and Deploy
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- 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: us-east-1
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Docker Environment
run: |
docker pull ubuntu:20.04
docker pull haproxytech/haproxy-ubuntu:2.6
docker pull openresty/openresty:buster
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 742127912612.dkr.ecr.us-west-2.amazonaws.com
docker pull 742127912612.dkr.ecr.us-west-2.amazonaws.com/sliderule-buildenv:latest
- name: Build Cluster Containers
run: |
cd targets/slideruleearth-aws
make BUILDX=buildx DOCKER_PLATFORM="--platform linux/arm64" DOCKEROPTS=--load ARCH=aarch64 cluster-docker
- name: Push Cluster Containers
run: |
cd targets/slideruleearth-aws
make cluster-docker-push
- name: Upload Cluster Terraform
run: |
cd targets/slideruleearth-aws
make cluster-upload-terraform
# - name: Build AMI
# run: |
# cd targets/slidruleearth-aws
# make cluster-build-packer