-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (48 loc) · 1.72 KB
/
testnet.yml
File metadata and controls
56 lines (48 loc) · 1.72 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
name: TestNet
on:
push:
branches: [ dev ]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Version
uses: pCYSl5EDgo/cat@master
id: version
with:
path: VERSION
trim: true
- name: Build & Push to Docker Hub
uses: opspresso/action-docker@master
env:
USERNAME: ${{ secrets.DOCKER_HUB_USER }}
PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
IMAGE_NAME: "minterteam/explorer-gate"
DOCKERFILE: ".docker/gate/Dockerfile"
LATEST: "true"
VERSION: "${{ steps.version.outputs.text }}"
TAG_NAME: ${{ github.sha }}
DOCKER_BUILD_ARGS: --build-arg VERSION=${{ steps.version.outputs.text }}
- name: DigitalOcean Kubernetes
uses: matootie/dokube@master
with:
personalAccessToken: ${{ secrets.DIGITALOCEAN_TOKEN }}
clusterName: k8s-prod-do
- name: Install helm
run: wget https://get.helm.sh/helm-v3.3.4-linux-amd64.tar.gz &> /dev/null && tar xvzf helm-v3.3.4-linux-amd64.tar.gz && chmod 777 linux-amd64/helm && ./linux-amd64/helm ls -n testnet-reserved
- name: Deploy to DO
env:
TAG_NAME: ${{ github.sha }}
run: ./linux-amd64/helm upgrade -n testnet-reserved -i gate chart/ --atomic --timeout 100s --set image.tag=$TAG_NAME --reuse-values
- name: notification
if: cancelled() == false
uses: xinthink/action-telegram@v1.1
with:
botToken: ${{ secrets.TELEGRAM_TOKEN }}
chatId: ${{ secrets.TELEGRAM_TO }}
jobStatus: ${{ job.status }}
skipSuccess: false