5
5
branches :
6
6
- main
7
7
8
- env :
9
- DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
10
- DOCKER_IMAGE_NAME : duckdb-spawn
11
- KOYEB_APP_NAME : duckdb-spawn
12
-
13
8
jobs :
14
- build-and- deploy :
9
+ deploy :
15
10
runs-on : ubuntu-latest
16
11
steps :
17
12
- name : Checkout code
18
13
uses : actions/checkout@v3
19
14
20
- - name : Set up QEMU
21
- uses : docker/setup-qemu-action@v2
22
-
23
- - name : Set up Docker Buildx
24
- uses : docker/setup-buildx-action@v2
25
-
26
- - name : Login to Docker Hub
27
- uses : docker/login-action@v2
15
+ - name : Install and configure Koyeb CLI
16
+ uses : koyeb-community/koyeb-actions@v2
28
17
with :
29
- username : ${{ secrets.DOCKER_HUB_USERNAME }}
30
- password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
31
- logout : true
18
+ api_token : " ${{ secrets.KOYEB_API_TOKEN }}"
32
19
33
- - name : Build and push Docker image
34
- uses : docker/build-push-action@v4
20
+ - name : Build and deploy to Koyeb
21
+ uses : koyeb/action-git-deploy@v1
35
22
with :
36
- context : .
37
- platforms : linux/amd64,linux/arm64
38
- push : true
39
- tags : |
40
- ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.DOCKER_IMAGE_NAME }}:latest
41
- ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.DOCKER_IMAGE_NAME }}:${{ github.sha }}
42
-
43
- - name : Install Koyeb CLI
44
- run : |
45
- curl -fsSL https://raw.githubusercontent.com/koyeb/koyeb-cli/master/install.sh | sh
46
- echo "$HOME/.koyeb/bin" >> $GITHUB_PATH
47
-
48
- - name : Deploy to Koyeb
49
- # Create an app on Koyeb using the koyeb.yaml file located in the root directory
50
- run : |
51
- koyeb apps create duckdb-spawn --config ./koyeb.yaml --token ${{ secrets.KOYEB_API_TOKEN }} --debug
52
- koyeb services create duckdb-spawn/api --config ./koyeb.yaml --token ${{ secrets.KOYEB_API_TOKEN }} --debug
23
+ app-name : duckdb-spawn
24
+ service-name : api
25
+ service-env : " PYTHONUNBUFFERED=1,LOG_LEVEL=info,ENVIRONMENT=staging"
26
+ service-ports : " 8000:http"
27
+ service-routes : " /:8000"
28
+ service-instance-type : " nano"
29
+ service-regions : " fra"
30
+ service-checks : " 8000:http:/monitoring/health"
31
+ git-branch : main
32
+ git-builder : docker
53
33
0 commit comments