Files
ai-memory/.github/workflows/release.yml
T
AkitaOnRailsandClaude Opus 4.7 d8e0542e6d release prep: MIT license, wiki migration framework, release scaffolding
- LICENSE (MIT) + workspace license = MIT (down from MIT OR Apache-2.0)
- Wiki-structure migration framework: V06 wiki_migrations table,
  WikiMigration trait, registry, and run_pending runner (registry
  starts empty; v1 ships per-project layout natively)
- CHANGELOG.md, SECURITY.md, CONTRIBUTING.md
- bin/release (fmt/clippy/test/deny/audit -> bump -> tag; never pushes)
- .github release workflow + issue/PR templates
- README: bootstrap example defers to default workspace/project
- evals: inherit version/edition/rust-version from workspace

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:57:19 -03:00

64 lines
1.9 KiB
YAML

name: release
# Triggered when a version tag is pushed, e.g. git push origin v0.2.0.
# Builds the Docker image and pushes it to Docker Hub with both the
# version tag and `latest`.
#
# Required secrets (set in repo Settings → Secrets and variables → Actions):
# DOCKERHUB_USERNAME — Docker Hub account name
# DOCKERHUB_TOKEN — Docker Hub access token (read/write)
#
# The CI workflow already validates the binary (fmt / clippy / test).
# This workflow assumes CI passed on the same commit; it only builds
# and pushes the image.
on:
push:
tags:
- 'v*.*.*'
env:
CARGO_TERM_COLOR: always
jobs:
docker:
name: docker build + push
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract the version from the tag (strips the leading "v").
- name: Extract version
id: version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/ai-memory:latest
${{ secrets.DOCKERHUB_USERNAME }}/ai-memory:${{ steps.version.outputs.VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Smoke test the published image
run: |
docker pull "${{ secrets.DOCKERHUB_USERNAME }}/ai-memory:${{ steps.version.outputs.VERSION }}"
docker run --rm \
"${{ secrets.DOCKERHUB_USERNAME }}/ai-memory:${{ steps.version.outputs.VERSION }}" \
--version