-
Notifications
You must be signed in to change notification settings - Fork 98
61 lines (48 loc) · 1.71 KB
/
Copy pathdeploy.yaml
File metadata and controls
61 lines (48 loc) · 1.71 KB
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
name: Build and Deploy
on:
push:
branches: [main]
jobs:
release-dev:
name: Release Dev
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "::set-output name=short_sha::$calculatedSha"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: GoReleaser
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
deploy-titus:
runs-on: ubuntu-latest
needs:
- release-dev
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Inject version and secrets to titus-1.yaml
run: |
sed -i -e "s|NODE_VERSION|${{ steps.vars.output.short_sha }}|g" ci/titus-1.yaml
sed -i -e "s|TITUS_1_ACCOUNT_MNEMONIC_B64|${{ secrets.TITUS_1_ACCOUNT_MNEMONIC_B64 }}|g" ci/titus-1.yaml
sed -i -e "s|TITUS_1_FAUCET_ACCOUNT_MNEMONIC_B64|${{ secrets.TITUS_1_FAUCET_ACCOUNT_MNEMONIC_B64 }}|g" ci/titus-1.yaml
sed -i -e "s|TITUS_1_PRIV_VALIDATOR_KEY_B64|${{ secrets.TITUS_1_PRIV_VALIDATOR_KEY_B64 }}|g" ci/titus-1.yaml
- name: Deploy Chain
uses: steebchen/kubectl@v2.0.0
with:
config: ${{ secrets.GKE_SHARED_NONPROD_GH_ACTIONS_BOT_KUBECONFIG }}
command: apply -n testnets -f ci/titus-1.yaml