Skip to content

.github/workflows/ai_cd.yaml #10

.github/workflows/ai_cd.yaml

.github/workflows/ai_cd.yaml #10

Workflow file for this run

on:
workflow_dispatch:
jobs:
compute-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- run: git fetch --tags --force
- uses: ./.github/actions/doxxer_install
- id: version
run: |
VERSION=$(doxxer --config doxxer.ai.toml next patch)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Computed version: $VERSION"
deploy:
needs: compute-version
runs-on: ubuntu-latest
timeout-minutes: 60
concurrency: ai-fly-deploy
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --config apps/ai/fly.toml --dockerfile apps/ai/Dockerfile --remote-only -e APP_VERSION=${{ needs.compute-version.outputs.version }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
tag:
needs: [compute-version, deploy]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ai_v${{ needs.compute-version.outputs.version }}
tag_prefix: ""