Skip to content

chore(workflows): update axiom-deployment-annotation action to use la… #1

chore(workflows): update axiom-deployment-annotation action to use la…

chore(workflows): update axiom-deployment-annotation action to use la… #1

name: Deploy Agent Production
on:
workflow_call:
secrets:
FLY_API_TOKEN:
required: true
description: "fly.io API token"
AXIOM_TOKEN:
required: true
description: "Axiom token"
jobs:
deploy:
environment: Production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Version
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Get tag
run: echo "TAG=ghcr.io/${{ github.repository }}:${{env.VERSION}}" > $GITHUB_ENV
- name: Login to image repository
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Download image
run: docker pull ${{env.TAG}}
- name: Annotate axiom
id: axiom-deployment-annotation
uses: axiomhq/annotation-action
with:
type: "production-release"
datasets: agent
axiomToken: ${{ secrets.AXIOM_TOKEN }}
# title: 'Production deployment ${{ env.VERSION }}'
# description: 'Commit ${{ github.event.head_commit.message }}'
- name: Deploy prod
run: flyctl -c="./fly.production.toml" deploy --image=${{ env.TAG }} --strategy=canary
working-directory: apps/agent
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}