-
Notifications
You must be signed in to change notification settings - Fork 556
45 lines (42 loc) · 1.32 KB
/
ai_cd.yaml
File metadata and controls
45 lines (42 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ai_v${{ needs.compute-version.outputs.version }}
tag_prefix: ""