Skip to content

Wokrflow fix

Wokrflow fix #30

Workflow file for this run

name: "Backend: Build & Deploy"
on:
workflow_dispatch:
push:
branches:
- main
env:
PROJECT_NAME: subabot
jobs:
build_and_push:
name: Build & Push Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build, tag and push Docker image
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: ${{ github.repository_owner }}/${{ env.PROJECT_NAME }}:latest,${{ github.repository_owner }}/${{ env.PROJECT_NAME }}:${{ github.sha }}
platforms: linux/arm64,linux/amd64
prefect_deploy:
name: Prefect Deploy
runs-on: ubuntu-latest
needs: build_and_push
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Prefect Deploy
env:
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
run: |
cd backend
uv run task deploy