Reusable GitHub Actions for vantage6 projects.
Workflow: .github/workflows/algorithm-release.yml
Intended for vantage6 algorithm repositories that use pyproject.toml, uv (uv sync), Python 3.13, and read the platform version from vantage6.common.__version__. It runs on a tag push in the caller repository (typically *.*.*).
In general, these requirements are met by algorithms created with the v6-algorithm-template repository via the CLI command
v6 algorithm create.
Note that the workflow is designed for vantage6 v5+. It will not work for vantage6 v4 and older.
name: Create Release
on:
push:
tags:
- "*.*.*"
jobs:
release:
uses: vantage6/vantage6-workflows/.github/workflows/algorithm-release.yml@<commit-sha>
secrets: inherit
# Optional inputs / secrets (defaults match GHCR + GITHUB_TOKEN)
# with:
# registry: docker.io
# registry_username: myuser
# docker_image: ghcr.io/myorg/algorithm/my-algo # for v6 major-tag policy (see below)
# secrets:
# registry_password: ${{ secrets.DOCKERHUB_TOKEN }}Replace <commit-sha> with a full commit SHA from this repository (pin updates when the reusable workflow changes).
Inputs
| Name | Default | Purpose |
|---|---|---|
registry |
ghcr.io |
Registry hostname for docker/login-action |
registry_username |
(empty → github.actor) (typical for GHCR) |
Registry username |
docker_image |
(empty) | Full image name without tag (e.g. ghcr.io/vantage6/algorithm/session-basics). When set, algorithm prereleases still push the v6 major tag (:<major>) only if that tag does not exist in the registry yet; stable algorithm tags always allow the major tag. When empty, prereleases omit the major tag (callers that do not use INCLUDE_V6_MAJOR_TAG in Makefile are unaffected). |
Secrets
| Name | Required | Purpose |
|---|---|---|
registry_password |
No | Password or token for login; if omitted, github.token is used (typical for GHCR) |
With secrets: inherit only, registry_password is unset unless your repository defines a secret with the exact name registry_password. For a differently named PAT (e.g. DOCKERHUB_TOKEN), map it explicitly as in the example above.
The caller and this repository must live under the same GitHub organization (or otherwise satisfy GitHub’s access rules for reusable workflows).
- Parses the pushed tag into version components and resolves the remote branch the tag points at.
- Installs dependencies with
uv syncand readsvantage6.common.__version__for Docker base tagging. - Creates a GitHub Release (
softprops/action-gh-release); prerelease when the tag has a non-numeric stage suffix. - Logs in to the configured registry (defaults:
ghcr.io,github.actor,github.token), decides whether to passINCLUDE_V6_MAJOR_TAG=truetomakewhen theMakefilesupports it, and runsmake image TAG=<tag> PUSH_REG=true VANTAGE6_VERSION=<resolved>.
Algorithm repos still on vantage6 v4 should keep their own workflows until they are migrated to v5.