diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index 338d9bb..0000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,31 +0,0 @@ -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 diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 0000000..9eff4af --- /dev/null +++ b/.github/workflows/push.yaml @@ -0,0 +1,24 @@ +name: Build and Push + +on: + push: + branches: + - main + paths-ignore: + - '**.md' + - '.github/**' + - '.gitignore' + workflow_dispatch: + +jobs: + build: + name: Build and Push Cog Image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: replicate/setup-cog@v2 + with: + install-cuda: false + cog-version: v0.9.12 + - run: cog push ghcr.io/fly-apps/cog-whisper:latest --use-cuda-base-image false