From 43ef0707e5b74efb754b0952c157099d4f549dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B4nio=20Miranda?= Date: Mon, 10 Aug 2026 18:55:42 -0300 Subject: [PATCH] ci: publish docker image from main and tagged releases - trigger GHCR publishing on pushes to main - keep tagged v* releases creating versioned images and GitHub releases - add latest, main, and sha-based image tags for continuous delivery - update documentation to reflect the new Docker publishing flow --- .github/workflows/release.yml | 6 +++++- README.md | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b6efbf..2155159 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,8 @@ name: Release on: push: + branches: + - main tags: - "v*" workflow_dispatch: @@ -39,8 +41,10 @@ jobs: with: images: ${{ env.REGISTRY_IMAGE }} tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=main,enable={{is_default_branch}} + type=sha,prefix=sha- type=ref,event=tag - type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} - name: Build and push image uses: docker/build-push-action@v6 diff --git a/README.md b/README.md index 93a8066..641bfec 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,8 @@ The compose file mounts `bot_database.db` so voice statistics survive container - Slash commands can take a minute to appear globally after the first startup. - Existing databases continue to work. User names are refreshed automatically as members interact again. - Notification on/off state is stored in SQLite. -- CI and release now use only standard GitHub-hosted runners and GHCR publishing. +- Pushes to `main` now publish Docker images to GHCR with `latest`, `main`, and `sha-*` tags. +- Version tags like `v1.2.3` also create a GitHub release. ## Portugues