Skip to content

Commit

Permalink
chore(fly): add workflow for fly.io deploy
Browse files Browse the repository at this point in the history
with related fly.toml config
  • Loading branch information
andros21 committed Sep 26, 2023
1 parent 00a80b2 commit 8cc1bb6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: cd

"on":
workflow_dispatch:
push:
branches:
- flyio

permissions:
contents: read

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
deploy:
name: deploy filmbot
runs-on: ubuntu-latest
environment:
name: flyio
steps:
- name: install cosign
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19
- name: verify filmbot image
run: |
cosign verify \
--certificate-identity \
'https://github.com/andros21/filmbot/.github/workflows/ci.yml@refs/heads/master' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" | jq .
- name: flyio setup
uses: superfly/flyctl-actions/setup-flyctl@master
- name: flyio deploy
run: |
flyctl deploy --image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
12 changes: 12 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
app = "filmbot"
primary_region = "cdg"

[env]
RUST_LOG = "info"

[experimental]
auto_rollback = true

[mounts]
source = "data"
destination = "/home/nonroot/data"

0 comments on commit 8cc1bb6

Please sign in to comment.