Skip to content

Phase 14: LLM agent eval harness #2

Phase 14: LLM agent eval harness

Phase 14: LLM agent eval harness #2

Workflow file for this run

name: deploy
# Builds the Docker image, pushes it to GitHub Container Registry, and (optionally)
# deploys it to Fly.io.
#
# Triggers:
# - Tag push (v*.*.*) → build, push :<tag> + :latest, deploy to Fly
# - Manual workflow_dispatch → same flow, useful for hotfixes
#
# Required secrets:
# FLY_API_TOKEN (only needed if you want the deploy step; safely skipped if absent)
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.meta.outputs.tags }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy-fly:
needs: build-and-push
runs-on: ubuntu-latest
# Only attempt the Fly deploy if the token is present — keeps the workflow green
# for forks / contributors who don't have prod access.
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Fly CLI
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to Fly.io
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: |
if [ -z "${FLY_API_TOKEN:-}" ]; then
echo "FLY_API_TOKEN not set — skipping deploy."
exit 0
fi
flyctl deploy --remote-only