fix: consolidate all multi-command steps into script blocks
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 <noreply@anthropic.com>
This commit is contained in:
+20
-17
@@ -63,12 +63,13 @@ steps:
|
|||||||
- name: package
|
- name: package
|
||||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||||
commands:
|
commands:
|
||||||
- VERSION=$(cat .version)
|
- |
|
||||||
- echo "Packaging version $VERSION"
|
VERSION=$(cat .version)
|
||||||
- dotnet restore
|
echo "Packaging version $VERSION"
|
||||||
- dotnet build -c Release
|
dotnet restore
|
||||||
- dotnet pack PaperlessMCP/PaperlessMCP.csproj -c Release -o ./artifacts /p:Version=$VERSION /p:PackageVersion=$VERSION
|
dotnet build -c Release
|
||||||
- ls -la ./artifacts/
|
dotnet pack PaperlessMCP/PaperlessMCP.csproj -c Release -o ./artifacts /p:Version=$VERSION /p:PackageVersion=$VERSION
|
||||||
|
ls -la ./artifacts/
|
||||||
depends_on: [version]
|
depends_on: [version]
|
||||||
|
|
||||||
# Build and push Docker with Kaniko
|
# Build and push Docker with Kaniko
|
||||||
@@ -80,14 +81,16 @@ steps:
|
|||||||
GHCR_TOKEN:
|
GHCR_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
commands:
|
commands:
|
||||||
- VERSION=$(cat .version)
|
- |
|
||||||
- mkdir -p /kaniko/.docker
|
VERSION=$(cat .version)
|
||||||
- echo "{\"auths\":{\"ghcr.io\":{\"username\":\"$GHCR_USERNAME\",\"password\":\"$GHCR_TOKEN\"}}}" > /kaniko/.docker/config.json
|
echo "Building Docker image version: $VERSION"
|
||||||
- /kaniko/executor
|
mkdir -p /kaniko/.docker
|
||||||
--context=$CI_WORKSPACE/PaperlessMCP
|
echo "{\"auths\":{\"ghcr.io\":{\"username\":\"$GHCR_USERNAME\",\"password\":\"$GHCR_TOKEN\"}}}" > /kaniko/.docker/config.json
|
||||||
--dockerfile=$CI_WORKSPACE/PaperlessMCP/Dockerfile
|
/kaniko/executor \
|
||||||
--destination=ghcr.io/barryw/paperlessmcp:v${VERSION}
|
--context=$CI_WORKSPACE/PaperlessMCP \
|
||||||
--destination=ghcr.io/barryw/paperlessmcp:latest
|
--dockerfile=$CI_WORKSPACE/PaperlessMCP/Dockerfile \
|
||||||
|
--destination=ghcr.io/barryw/paperlessmcp:v${VERSION} \
|
||||||
|
--destination=ghcr.io/barryw/paperlessmcp:latest \
|
||||||
--build-arg=VERSION=${VERSION}
|
--build-arg=VERSION=${VERSION}
|
||||||
depends_on: [version]
|
depends_on: [version]
|
||||||
|
|
||||||
@@ -98,10 +101,10 @@ steps:
|
|||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
commands:
|
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.email "ci@woodpecker.local"
|
||||||
git config user.name "Woodpecker CI"
|
git config user.name "Woodpecker CI"
|
||||||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/barryw/PaperlessMCP.git
|
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/barryw/PaperlessMCP.git
|
||||||
|
|||||||
Reference in New Issue
Block a user