chore(workflows): update axiom-deployment-annotation action to use la… #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |