From 627b9fdf6c62cea889281525e0696382b5c10168 Mon Sep 17 00:00:00 2001 From: Barry Walker Date: Tue, 13 Jan 2026 16:10:44 -0500 Subject: [PATCH] fix: consolidate all multi-command steps into script blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each command runs in separate shell - variables don't persist. All steps with variable dependencies now use single script blocks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .woodpecker/release.yml | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml index 5d33443..c5f5eac 100644 --- a/.woodpecker/release.yml +++ b/.woodpecker/release.yml @@ -63,12 +63,13 @@ steps: - name: package image: mcr.microsoft.com/dotnet/sdk:10.0 commands: - - VERSION=$(cat .version) - - echo "Packaging version $VERSION" - - dotnet restore - - dotnet build -c Release - - dotnet pack PaperlessMCP/PaperlessMCP.csproj -c Release -o ./artifacts /p:Version=$VERSION /p:PackageVersion=$VERSION - - ls -la ./artifacts/ + - | + VERSION=$(cat .version) + echo "Packaging version $VERSION" + dotnet restore + dotnet build -c Release + dotnet pack PaperlessMCP/PaperlessMCP.csproj -c Release -o ./artifacts /p:Version=$VERSION /p:PackageVersion=$VERSION + ls -la ./artifacts/ depends_on: [version] # Build and push Docker with Kaniko @@ -80,15 +81,17 @@ steps: GHCR_TOKEN: from_secret: github_token commands: - - VERSION=$(cat .version) - - mkdir -p /kaniko/.docker - - echo "{\"auths\":{\"ghcr.io\":{\"username\":\"$GHCR_USERNAME\",\"password\":\"$GHCR_TOKEN\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor - --context=$CI_WORKSPACE/PaperlessMCP - --dockerfile=$CI_WORKSPACE/PaperlessMCP/Dockerfile - --destination=ghcr.io/barryw/paperlessmcp:v${VERSION} - --destination=ghcr.io/barryw/paperlessmcp:latest - --build-arg=VERSION=${VERSION} + - | + VERSION=$(cat .version) + echo "Building Docker image version: $VERSION" + mkdir -p /kaniko/.docker + echo "{\"auths\":{\"ghcr.io\":{\"username\":\"$GHCR_USERNAME\",\"password\":\"$GHCR_TOKEN\"}}}" > /kaniko/.docker/config.json + /kaniko/executor \ + --context=$CI_WORKSPACE/PaperlessMCP \ + --dockerfile=$CI_WORKSPACE/PaperlessMCP/Dockerfile \ + --destination=ghcr.io/barryw/paperlessmcp:v${VERSION} \ + --destination=ghcr.io/barryw/paperlessmcp:latest \ + --build-arg=VERSION=${VERSION} depends_on: [version] # Create git tag and push @@ -98,10 +101,10 @@ steps: GITHUB_TOKEN: from_secret: github_token commands: - - TAG=$(cat .tag) - - VERSION=$(cat .version) - - echo "Creating tag $TAG" - | + TAG=$(cat .tag) + VERSION=$(cat .version) + echo "Creating tag $TAG for version $VERSION" git config user.email "ci@woodpecker.local" git config user.name "Woodpecker CI" git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/barryw/PaperlessMCP.git