Skip to content

Commit 1747800

Browse files
authored
Merge pull request #308 from drift-labs/master
bump mainnet
2 parents edcb843 + b3b85c8 commit 1747800

File tree

2 files changed

+146
-0
lines changed

2 files changed

+146
-0
lines changed

.github/workflows/mainnet-beta.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: KeeperBots Build Image And Deploy
2+
3+
on:
4+
push:
5+
branches: [mainnet-beta]
6+
7+
jobs:
8+
build:
9+
runs-on: ubicloud
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/checkout@v3
13+
with:
14+
submodules: 'recursive'
15+
16+
- name: Configure AWS credentials
17+
uses: aws-actions/configure-aws-credentials@master
18+
with:
19+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_PROD }}
20+
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_PROD }}
21+
aws-region: ${{ secrets.EKS_PROD_REGION }}
22+
23+
- name: Log in to Amazon ECR
24+
id: login-ecr
25+
uses: aws-actions/amazon-ecr-login@v2
26+
27+
- name: Build and push
28+
uses: docker/build-push-action@v6
29+
env:
30+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
31+
ECR_REPOSITORY: keeper-bots-v2
32+
IMAGE_TAG: ${{ github.sha }}
33+
BRANCH_NAME: ${{ github.ref_name }}
34+
with:
35+
context: .
36+
push: true
37+
tags: |
38+
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}-${{ env.BRANCH_NAME }}-amd64
39+
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest-${{ env.BRANCH_NAME }}-amd64
40+
41+
deploy:
42+
runs-on: ubicloud
43+
needs: [build]
44+
steps:
45+
- name: Configure AWS credentials
46+
uses: aws-actions/configure-aws-credentials@master
47+
with:
48+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_PROD }}
49+
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_PROD }}
50+
aws-region: ${{ secrets.EKS_PROD_REGION }}
51+
52+
- name: Install kubectl
53+
uses: azure/setup-kubectl@v3
54+
with:
55+
version: 'v1.30.0'
56+
57+
- name: Configure AWS EKS Credentials
58+
run: aws eks update-kubeconfig --name ${{ secrets.EKS_PROD_CLUSTER_NAME }} --region ${{ secrets.EKS_PROD_REGION }} --role-arn ${{ secrets.EKS_PROD_DEPLOY_ROLE }}
59+
60+
- name: Restart deployment
61+
env:
62+
BRANCH_NAME: ${{ github.ref_name }}
63+
run: |
64+
kubectl get deployments -n $BRANCH_NAME -o name | grep order-filler-bot | xargs -I {} kubectl rollout restart {} -n $BRANCH_NAME
65+
kubectl get deployments -n $BRANCH_NAME -o name | grep spot-filler-bot | xargs -I {} kubectl rollout restart {} -n $BRANCH_NAME
66+
67+
kubectl rollout restart -n $BRANCH_NAME deployment/funding-rate-updater-bot
68+
69+
kubectl rollout restart -n $BRANCH_NAME deployment/liquidator-global-bot
70+
kubectl rollout restart -n $BRANCH_NAME deployment/liquidator-global-2-bot
71+
kubectl rollout restart -n $BRANCH_NAME deployment/user-lp-settler-bot
72+
kubectl rollout restart -n $BRANCH_NAME deployment/user-pnl-settler-bot
73+
kubectl rollout restart -n $BRANCH_NAME deployment/order-filler-multithreaded-jito-bot
74+
kubectl rollout restart -n $BRANCH_NAME deployment/order-filler-multithreaded-jito-btc-eth
75+
kubectl rollout restart -n $BRANCH_NAME deployment/spot-filler-multithreaded-rest
76+
kubectl rollout restart -n $BRANCH_NAME deployment/spot-filler-multithreaded-sol
77+
kubectl rollout restart -n $BRANCH_NAME deployment/pyth-cranker-bot
78+
kubectl rollout restart -n $BRANCH_NAME deployment/pyusd-distributor-bot
79+
kubectl rollout restart -n $BRANCH_NAME deployment/switchboard-cranker-bot

.github/workflows/master.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: KeeperBots Build Image And Deploy
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
runs-on: ubicloud
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/checkout@v3
13+
with:
14+
submodules: recursive
15+
16+
- name: Configure AWS credentials
17+
uses: aws-actions/configure-aws-credentials@master
18+
with:
19+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_NON_PROD }}
20+
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_NON_PROD }}
21+
aws-region: ${{ secrets.EKS_NON_PROD_REGION }}
22+
23+
- name: Log in to Amazon ECR
24+
id: login-ecr
25+
uses: aws-actions/amazon-ecr-login@v2
26+
27+
- name: Build and push
28+
uses: docker/build-push-action@v6
29+
env:
30+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
31+
ECR_REPOSITORY: keeper-bots-v2
32+
IMAGE_TAG: ${{ github.sha }}
33+
BRANCH_NAME: ${{ github.ref_name }}
34+
with:
35+
context: .
36+
push: true
37+
tags: |
38+
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}-${{ env.BRANCH_NAME }}-amd64
39+
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest-${{ env.BRANCH_NAME }}-amd64
40+
41+
deploy:
42+
runs-on: ubicloud
43+
needs: [build]
44+
steps:
45+
- name: Configure AWS credentials
46+
uses: aws-actions/configure-aws-credentials@master
47+
with:
48+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_NON_PROD }}
49+
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_NON_PROD }}
50+
aws-region: ${{ secrets.EKS_NON_PROD_REGION }}
51+
52+
- name: Install kubectl
53+
uses: azure/setup-kubectl@v3
54+
with:
55+
version: 'v1.30.0'
56+
57+
- name: Configure AWS EKS Credentials
58+
run: aws eks update-kubeconfig --name ${{ secrets.EKS_NON_PROD_CLUSTER_NAME }} --region ${{ secrets.EKS_NON_PROD_REGION }} --role-arn ${{ secrets.EKS_NON_PROD_DEPLOY_ROLE }}
59+
60+
- name: Restart deployment
61+
env:
62+
BRANCH_NAME: ${{ github.ref_name }}
63+
run: |
64+
kubectl get deployments -n $BRANCH_NAME -o name | grep filler | xargs -I {} kubectl rollout restart {} -n $BRANCH_NAME
65+
kubectl rollout restart -n $BRANCH_NAME deployment/liquidator-bot
66+
kubectl rollout restart -n $BRANCH_NAME deployment/pyth-cranker-bot
67+
kubectl rollout restart -n $BRANCH_NAME deployment/switchboard-cranker-bot

0 commit comments

Comments
 (0)