generated from fly-apps/cog-sd3
-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (27 loc) · 855 Bytes
/
deploy.yaml
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
name: Build and Deploy
on: [workflow_dispatch]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
build:
name: Build and Push Cog Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- uses: replicate/setup-cog@v1
with:
install-cuda: false
cog-version: v0.9.4
- run: flyctl auth docker
- id: getApp
run: echo "APP_NAME=$(flyctl status --json | jq -r .ID)" >> $GITHUB_ENV
- run: cog push registry.fly.io/${{ env.APP_NAME }}:latest --use-cuda-base-image false
deploy:
name: Deploy Cog to Fly
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy