-
Notifications
You must be signed in to change notification settings - Fork 29
91 lines (84 loc) · 2.48 KB
/
RPCNodeTest.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: RpcNodeTest
on:
push:
tags:
- '*-manual'
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
platform: [scalable]
runs-on: ${{ matrix.platform }}
env:
ENV: release
PRIVATE_ECR_URL: 358484141435.dkr.ecr.us-west-2.amazonaws.com
PUBLIC_ECR_URL: public.ecr.aws/k6m5b6e2
DOCKERHUB_URL: findoranetwork
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Prepare key
shell: bash
run: |
tar -C ~/.ssh -zcf key.tar.gz ./
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-east-1
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: public
- name: Clean garbage containers and images
shell: bash
run: |
docker rm $(docker ps -a | grep -v "^CONTAINER" | awk '{print $1}') || true
docker rmi -f $(docker images -f "dangling=true" -q) || true
- name: Build rust base image
shell: bash
run: |
make ci_build_binary_rust_base
- name: Build binary image
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
shell: bash
run: |
echo "REF: ${GITHUB_REF}"
TAGS=$(grep "refs/tags" <<< ${GITHUB_REF}) || true
TAGV="${TAGS#refs/tags/}"
export IMAGE_TAG="RPCNode-${TAGV:-main}"
export VERGEN_SHA_EXTERN="${IMAGE_TAG}"
echo "Image tag: ${IMAGE_TAG}"
make ci_build_release_web3_binary_image
- name: Build images
env:
PRIVATE_ECR_URL: ${{ env.PRIVATE_ECR_URL }}
PUBLIC_ECR_URL: ${{ env.PUBLIC_ECR_URL }}
ENV: release
shell: bash
run: |
echo "REF: ${GITHUB_REF}"
TAGS=$(grep "refs/tags" <<< ${GITHUB_REF}) || true
TAGV="${TAGS#refs/tags/}"
export IMAGE_TAG="RPCNode-${TAGV:-main}"
echo "Image tag: ${IMAGE_TAG}"
make ci_build_image_web3
- name: Push images
env:
PRIVATE_ECR_URL: ${{ env.PRIVATE_ECR_URL }}
PUBLIC_ECR_URL: ${{ env.PUBLIC_ECR_URL }}
ENV: release
shell: bash
run: |
echo "REF: ${GITHUB_REF}"
TAGS=$(grep "refs/tags" <<< ${GITHUB_REF}) || true
TAGV="${TAGS#refs/tags/}"
export IMAGE_TAG="RPCNode-${TAGV:-main}"
echo "Image tag: ${IMAGE_TAG}"
make ci_push_image