Skip to content

.github/workflows/api_cd.yaml #43

.github/workflows/api_cd.yaml

.github/workflows/api_cd.yaml #43

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
- uses: ./.github/actions/doxxer_install
- id: version
run: |
VERSION=$(doxxer --config doxxer.api.toml next patch)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Computed version: $VERSION"
deploy:
needs: compute-version
runs-on: depot-ubuntu-24.04-8
timeout-minutes: 60
concurrency: api-fly-deploy
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --config apps/api/fly.toml --remote-only -e APP_VERSION=${{ needs.compute-version.outputs.version }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
tag:
needs: 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: api_v${{ needs.compute-version.outputs.version }}
tag_prefix: ""