-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (33 loc) · 1.21 KB
/
deploy-worker-compiler.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
name: Build and worker-compiler
on:
push:
branches:
- 'main'
paths:
- 'apps/worker-compiler/**'
- 'docker/worker-compiler/**'
- '.github/workflows/deploy-worker-compiler.yml'
jobs:
Deploy-worker-compiler:
name: Builds and pushes to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Copy Docker image to root
run: cp ./docker/worker-compiler/Dockerfile .
- name: Build Docker Image
run: docker build --build-arg DATABASE_URL=${{ secrets.DATABASE_URL }} --build-arg REDIS_URL=${{ secrets.REDIS_URL }} -t vishal022/algoearth-worker-compiler:latest .
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
run: docker push vishal022/algoearth-worker-compiler:latest
- name: Setup Kubectl
uses: azure/k8s-set-context@v1
with:
kubeconfig: ${{ secrets.KUBE_CONFIG }}
- name: Redeploy the web
run: kubectl rollout restart deployment/worker-compiler