Skip to content

fix: Fix Docker Compose configuration to use DATABASE_URL #3

fix: Fix Docker Compose configuration to use DATABASE_URL

fix: Fix Docker Compose configuration to use DATABASE_URL #3

Workflow file for this run

name: πŸš€ Deploy to Fly.io
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build:
name: πŸ› οΈ Build
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: πŸ‘€ Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: 'fly.toml'
field: 'app'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: πŸ”‘ Fly Registry Auth
uses: docker/login-action@v2
with:
registry: registry.fly.io
username: x
password: ${{ secrets.FLY_API_TOKEN }}
- name: 🐳 Docker build
uses: docker/build-push-action@v4
with:
context: .
target: deploy
push: true
tags:
registry.fly.io/${{ steps.app_name.outputs.value }}:${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha
provenance: false
deploy:
name: πŸš€ Deploy
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: πŸ‘€ Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: 'fly.toml'
field: 'app'
- name: πŸš€ Deploy Production
uses: superfly/[email protected]
with:
args:
'deploy --image registry.fly.io/${{ steps.app_name.outputs.value }}:${{ github.ref_name }}'
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}