v0.5.1 #20
Workflow file for this run
This file contains hidden or 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: Release image | |
| # Builds and publishes the agami-core server image to GHCR so a self-host deploy can PULL it | |
| # (image: ghcr.io/agamiai/agami-core) instead of cloning the repo to build from source. The | |
| # migrations are baked into the image by deploy/Dockerfile, so the published image is self-contained. | |
| # | |
| # Manual prerequisite (ONE-TIME): after the first successful publish, set the `agami-core` GHCR | |
| # package visibility to PUBLIC (GitHub -> org Packages -> agami-core -> Package settings). The first | |
| # publish lands it private by default; anonymous `docker pull` needs it public. GHCR push uses the | |
| # per-run GITHUB_TOKEN below -- there is no PAT or registry secret to manage. | |
| on: | |
| release: | |
| types: [published] | |
| # Manual test-publish (tags the image with the commit sha, no `latest`) so the workflow can be | |
| # smoke-tested without cutting a formal release. | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| name: build + push (multi-arch -> GHCR) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # checkout | |
| packages: write # push to GHCR | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| # arm64 emulation + buildx, so one job produces a linux/amd64 + linux/arm64 manifest. | |
| - uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 | |
| - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # metadata-action lowercases the image name, so the AgamiAI owner -> agamiai. | |
| - id: meta | |
| uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/agami-core | |
| # semver + latest only on a real release (so a workflow_dispatch from a tag ref can't mint or | |
| # overwrite a released version); a sha tag for dispatch test runs. | |
| tags: | | |
| type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }} | |
| type=semver,pattern={{major}}.{{minor}},enable=${{ github.event_name == 'release' }} | |
| type=raw,value=latest,enable=${{ github.event_name == 'release' }} | |
| type=sha,enable=${{ github.event_name == 'workflow_dispatch' }} | |
| # Build context is the repo root -- the Dockerfile COPYs packages/agami-core, migrations/, and | |
| # deploy/entrypoint.sh (see deploy/docker-compose.yml `build.context: ..`). | |
| - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 | |
| with: | |
| context: . | |
| file: deploy/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |