Skip to content

Commit 4d36902

Browse files
committed
upd
1 parent 46bd54e commit 4d36902

File tree

1 file changed

+16
-36
lines changed

1 file changed

+16
-36
lines changed

.github/workflows/koyeb-deploy.yml

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,29 @@ on:
55
branches:
66
- main
77

8-
env:
9-
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
10-
DOCKER_IMAGE_NAME: duckdb-spawn
11-
KOYEB_APP_NAME: duckdb-spawn
12-
138
jobs:
14-
build-and-deploy:
9+
deploy:
1510
runs-on: ubuntu-latest
1611
steps:
1712
- name: Checkout code
1813
uses: actions/checkout@v3
1914

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
2817
with:
29-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
30-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
31-
logout: true
18+
api_token: "${{ secrets.KOYEB_API_TOKEN }}"
3219

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
3522
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
5333

0 commit comments

Comments
 (0)