Skip to content

build prefect image for both amd64 & arm64 #19

build prefect image for both amd64 & arm64

build prefect image for both amd64 & arm64 #19

name: "Prefect: Deploy Flow"
on:
workflow_dispatch:
push:
branches:
- main
env:
PROJECT_NAME: subabot
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in 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 }}:prefect-${{ github.sha }}
platforms: linux/arm64
- 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: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Prefect Deploy
env:
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
SUBABOT_BACKEND_URL: ${{ secrets.SUBABOT_BACKEND_URL }}
SUBABOT_FRONTEND_URL: ${{ secrets.SUBABOT_FRONTEND_URL }}
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }}
SLACK_CLIENT_SECRET: ${{ secrets.SLACK_CLIENT_SECRET }}
SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }}
SLACK_APP_ID: ${{ secrets.SLACK_APP_ID }}
SLACK_TEAM_ID: ${{ secrets.SLACK_TEAM_ID }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
run: |
cd backend
uv sync --frozen
uv run task deploy