diff --git a/.github/actions/release.sh b/.github/actions/release.sh index 42b1930..c90d7a4 100644 --- a/.github/actions/release.sh +++ b/.github/actions/release.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +# Version aliases identify published releases; only primary tags publish images. +if [[ "${GITHUB_REF:-}" =~ ^refs/tags/.+-r[0-9]+$ ]]; then + exit 0 +fi + set -ex if [[ "${GITHUB_REF}" == refs/heads/master || "${GITHUB_REF}" == refs/tags/* ]]; then @@ -27,10 +32,10 @@ if [[ "${GITHUB_REF}" == refs/heads/master || "${GITHUB_REF}" == refs/tags/* ]]; fi if [[ "${GITHUB_REF}" == refs/tags/* ]]; then - stability_tag="${GITHUB_REF##*/}" - tags=("${minor_tag}-${stability_tag}") + image_revision="${GITHUB_REF##*/}" + tags=("${minor_tag}-${image_revision}") if [[ -n "${LATEST_MAJOR}" ]]; then - tags+=("${major_tag}-${stability_tag}") + tags+=("${major_tag}-${image_revision}") fi else if [[ -n "${LATEST}" ]]; then diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 94d9ad4..1f177cd 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -7,6 +7,7 @@ on: tags: - '*' + - '!*-r[0-9]*' pull_request: @@ -128,3 +129,18 @@ jobs: user_id: ${{ matrix.user_id }} latest: ${{ matrix.python.latest }} latest_major: ${{ matrix.python.latest_major }} + + image-revision-aliases: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/r') + needs: [ push ] + runs-on: ubuntu-latest + permissions: + contents: write + concurrency: + group: image-revision-aliases-${{ github.ref }} + cancel-in-progress: false + steps: + - uses: wodby/images/.github/actions/image-revision-aliases@6a3956567002e48847338be97b4d955ee40ae7cb + with: + docker_username: ${{ secrets.DOCKER_USERNAME }} + docker_password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.image-release-format b/.image-release-format new file mode 100644 index 0000000..bc0ffae --- /dev/null +++ b/.image-release-format @@ -0,0 +1 @@ +revision diff --git a/.image-revision-aliases.json b/.image-revision-aliases.json new file mode 100644 index 0000000..7b826b0 --- /dev/null +++ b/.image-revision-aliases.json @@ -0,0 +1,134 @@ +{ + "schema": 1, + "image": "wodby/python", + "versions": [ + { + "version": { + "env": "PYTHON314" + }, + "variants": [ + { + "short": [ + "{minor}", + "{major}" + ], + "full": "{version}" + }, + { + "short": [ + "{minor}-dev", + "{major}-dev" + ], + "full": "{version}-dev" + }, + { + "short": [ + "{minor}-dev-macos", + "{major}-dev-macos" + ], + "full": "{version}-dev-macos" + } + ] + }, + { + "version": { + "env": "PYTHON313" + }, + "variants": [ + { + "short": [ + "{minor}" + ], + "full": "{version}" + }, + { + "short": [ + "{minor}-dev" + ], + "full": "{version}-dev" + }, + { + "short": [ + "{minor}-dev-macos" + ], + "full": "{version}-dev-macos" + } + ] + }, + { + "version": { + "env": "PYTHON312" + }, + "variants": [ + { + "short": [ + "{minor}" + ], + "full": "{version}" + }, + { + "short": [ + "{minor}-dev" + ], + "full": "{version}-dev" + }, + { + "short": [ + "{minor}-dev-macos" + ], + "full": "{version}-dev-macos" + } + ] + }, + { + "version": { + "env": "PYTHON311" + }, + "variants": [ + { + "short": [ + "{minor}" + ], + "full": "{version}" + }, + { + "short": [ + "{minor}-dev" + ], + "full": "{version}-dev" + }, + { + "short": [ + "{minor}-dev-macos" + ], + "full": "{version}-dev-macos" + } + ] + }, + { + "version": { + "env": "PYTHON310" + }, + "variants": [ + { + "short": [ + "{minor}" + ], + "full": "{version}" + }, + { + "short": [ + "{minor}-dev" + ], + "full": "{version}-dev" + }, + { + "short": [ + "{minor}-dev-macos" + ], + "full": "{version}-dev-macos" + } + ] + } + ] +} diff --git a/README.md b/README.md index 79e5c3f..44623be 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,13 @@ ## Docker Images -❗For better reliability we release images with stability tags (`wodby/python:3-X.X.X`) which correspond to [git tags](https://github.com/wodby/python/releases). We strongly recommend using images only with stability tags. +Use image revision tags such as `wodby/python:3.14-rN` to select a Wodby image revision. +Major and minor tags use the repository release number, starting at `r0`. Full-version tags such as +`wodby/python:3.14.7-r0` start at `r0` for each exact upstream version. +Every published versioned revision tag has a matching annotated Git tag pointing to its release commit. +Existing tags remain available after support for their major or minor version ends. +See [release tags](https://github.com/wodby/python/tags) for available revisions and the [image revision policy](https://github.com/wodby/images#image-revisions) for upgrade guidance. +Previously published image tags remain available. About images: @@ -108,7 +114,7 @@ Change `WODBY_USER_ID` and `WODBY_GROUP_ID` mainly for local dev version of imag ## Changelog -Changes per stability tag reflected in the git tags description under [releases](https://github.com/wodby/python/releases). +For changes in each image revision, see the [release notes](https://github.com/wodby/python/releases). ## Crond