-
Notifications
You must be signed in to change notification settings - Fork 12
76 lines (63 loc) · 2.17 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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 CoastNet
uses: actions/checkout@v3
with:
repository: SlideRuleEarth/ut-ATL24-coastnet
path: ut-ATL24-coastnet
- name: Checkout Qtrees
uses: actions/checkout@v3
with:
repository: SlideRuleEarth/ut-ATL24-qtrees
path: ut-ATL24-qtrees
- name: Checkout OpenOceans++
uses: actions/checkout@v3
with:
repository: SlideRuleEarth/ut-ATL24-oopp
path: ut-ATL24-oopp
- name: Checkout repository
uses: actions/checkout@v3
with:
path: sliderule
- 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: Upload Cluster Terraform
run: |
cd sliderule/targets/slideruleearth-aws
make cluster-upload-terraform
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Docker Environment
run: |
docker pull amazonlinux:2023
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 sliderule/targets/slideruleearth-aws
make BUILDX=buildx DOCKER_PLATFORM="--platform linux/arm64" DOCKEROPTS=--load ARCH=aarch64 cluster-docker VERSION=unstable
- name: Push Cluster Containers
run: |
cd sliderule/targets/slideruleearth-aws
make cluster-docker-push VERSION=unstable
# - name: Build AMI
# run: |
# cd targets/slidruleearth-aws
# make cluster-build-packer