Skip to content

server/v0.2.0

server/v0.2.0 #4

Workflow file for this run

name: Deploy Prod - Tagged Release
on:
push:
tags:
- "server/v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to deploy (e.g. server/v1.2.3)"
required: true
type: string
jobs:
resolve:
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.resolve.outputs.sha }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Resolve tag to commit SHA
id: resolve
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="${{ inputs.tag }}"
SHA=$(git rev-list -1 "$TAG" 2>/dev/null) || { echo "::error::Tag '$TAG' not found"; exit 1; }
echo "Resolved tag '$TAG' to SHA: $SHA"
else
SHA="${{ github.sha }}"
echo "Using event SHA: $SHA"
fi
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
build:
runs-on: ubuntu-latest
needs: resolve
steps:
- name: Dispatch Build
uses: timescale/workflow-dispatch-action@main
with:
github-token: ${{ secrets.ORG_AUTOMATION_TOKEN }}
owner: timescale
repo: tiger-agents-deploy
workflow_id: build.yaml
ref: "main"
inputs: >
{
"repository": "memory-engine",
"dockerfile_path": "packages/server/Dockerfile",
"sha": "${{ needs.resolve.outputs.sha }}",
"latest": false
}
deploy:
runs-on: ubuntu-latest
needs: [resolve, build]
steps:
- name: Dispatch Deploy - prod
uses: timescale/workflow-dispatch-action@main
with:
github-token: ${{ secrets.ORG_AUTOMATION_TOKEN }}
owner: timescale
repo: tiger-agents-deploy
workflow_id: deploy.yaml
ref: "main"
inputs: >
{
"repository": "memory-engine",
"sha": "${{ needs.resolve.outputs.sha }}",
"env": "prod",
"namespace": "memory-engine"
}