Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

ci(release): tag images with major and major.minor (#1950)

Tin Sever9991b6900743
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cd716f03a..e6b1d5d2a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -220,15 +220,27 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GH_PACKAGE_TOKEN }}
- # Copies the published manifest, so :latest is the exact bytes released.
- - name: Tag images as latest
+ # Copies the published manifest, so the floating tags are the exact bytes
+ # released. Releases only come from main, so the newest version always
+ # owns its :major and :major.minor tags.
+ - name: Tag images as latest, major and major.minor
env:
OWNER: ${{ github.repository_owner }}
VERSION: ${{ needs.plan.outputs.version }}
run: |
+ if [[ ! "$VERSION" =~ ^([0-9]+)\.([0-9]+)\.[0-9]+$ ]]; then
+ echo "::error::Expected a major.minor.patch version, got '$VERSION'."
+ exit 1
+ fi
+ major="${BASH_REMATCH[1]}"
+ minor="${major}.${BASH_REMATCH[2]}"
for image in kaneo web api; do
ref="ghcr.io/${OWNER,,}/${image}"
- docker buildx imagetools create --tag "${ref}:latest" "${ref}:${VERSION}"
+ docker buildx imagetools create \
+ --tag "${ref}:latest" \
+ --tag "${ref}:${major}" \
+ --tag "${ref}:${minor}" \
+ "${ref}:${VERSION}"
done
chart-publish:
diff --git a/apps/docs/core/installation/docker-compose.mdx b/apps/docs/core/installation/docker-compose.mdx
index 3e19aea4b..6fc1c11f3 100644
--- a/apps/docs/core/installation/docker-compose.mdx
+++ b/apps/docs/core/installation/docker-compose.mdx
@@ -52,7 +52,7 @@ volumes:
postgres_data:
```
-This example pins Kaneo to a release so a pull does not unexpectedly upgrade it. See the [release notes](https://github.com/usekaneo/kaneo/releases) when choosing another version.
+This example pins Kaneo to a release so a pull does not unexpectedly upgrade it. See the [release notes](https://github.com/usekaneo/kaneo/releases) when choosing another version. To follow a release line instead, set `KANEO_IMAGE_TAG` to a major tag such as `2` or a major and minor tag such as `2.34`. These tags move to the newest matching release and only exist for lines released since they were introduced, so check the [available tags](https://github.com/usekaneo/kaneo/pkgs/container/kaneo) first. Pulling a newer image does not restart Kaneo; follow the [upgrade guide](/core/operations/upgrades) to apply it.
## 2. Add configuration