From 56b05107892d14c6bc70861ec3ebf82f26b430cf Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Fri, 6 Mar 2026 23:48:28 +0100 Subject: [PATCH] fix: update docker-compose image tag after CI builds the image Move docker-compose version pinning from release script to the release workflow so it runs after the image is pushed to GHCR. Dokploy will always find the referenced image. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 12 ++++++++++++ scripts/release.sh | 6 +----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc0c5ec..73b9905 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,3 +54,15 @@ jobs: uses: softprops/action-gh-release@v2 with: generate_release_notes: true + + - name: Pin docker-compose image to released version + env: + VERSION: ${{ github.ref_name }} + run: | + VERSION="${VERSION#v}" + sed -i "s|image: ghcr.io/bretzel-app/crumbs:.*|image: ghcr.io/bretzel-app/crumbs:${VERSION}|" docker-compose.yml + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add docker-compose.yml + git commit -m "chore: pin docker-compose to v${VERSION} [skip ci]" + git push origin HEAD:main diff --git a/scripts/release.sh b/scripts/release.sh index 22fedf7..dc73cc3 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -60,11 +60,7 @@ echo "Bumping $BUMP version..." npm version "$BUMP" -m "chore: bump version to %s" --no-git-tag-version NEW_VERSION=$(node -p "require('./package.json').version") - -# Pin docker-compose image to the new version tag -sed -i '' "s|image: ghcr.io/bretzel-app/crumbs:.*|image: ghcr.io/bretzel-app/crumbs:${NEW_VERSION}|" docker-compose.yml - -git add package.json docker-compose.yml +git add package.json git commit -m "chore: bump version to $NEW_VERSION" git tag "v$NEW_VERSION"