ci: detect existing Go/Node.js/pnpm before setup
Some checks failed
Build and Release / Lint and Test (push) Successful in 2m35s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 2m4s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 2m24s
Build and Release / Build Docker Image (push) Failing after 17s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 1m14s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 6m59s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 6m58s
Build and Release / Create Release (push) Has been skipped
Some checks failed
Build and Release / Lint and Test (push) Successful in 2m35s
Build and Release / Build Binaries (arm64, darwin) (push) Failing after 2m4s
Build and Release / Build Binaries (amd64, linux) (push) Failing after 2m24s
Build and Release / Build Docker Image (push) Failing after 17s
Build and Release / Build Binaries (arm64, linux) (push) Failing after 1m14s
Build and Release / Build Binaries (amd64, darwin) (push) Failing after 6m59s
Build and Release / Build Binaries (amd64, windows) (push) Failing after 6m58s
Build and Release / Create Release (push) Has been skipped
Skip setup actions when tools are already installed on the runner. This prevents forcing specific versions when the correct versions are already available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5bb06851b8
commit
9d7fab06d6
@ -27,18 +27,48 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check for existing Go
|
||||
id: go-check
|
||||
run: |
|
||||
if command -v go &> /dev/null; then
|
||||
GO_VER=$(go version | grep -oP 'go\d+\.\d+' | head -1)
|
||||
echo "version=$GO_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Go: $(go version)"
|
||||
fi
|
||||
|
||||
- name: Setup Go
|
||||
if: steps.go-check.outputs.version == ''
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: true
|
||||
|
||||
- name: Check for existing Node.js
|
||||
id: node-check
|
||||
run: |
|
||||
if command -v node &> /dev/null; then
|
||||
NODE_VER=$(node --version)
|
||||
echo "version=$NODE_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Node.js: $NODE_VER"
|
||||
fi
|
||||
|
||||
- name: Setup Node.js
|
||||
if: steps.node-check.outputs.version == ''
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Check for existing pnpm
|
||||
id: pnpm-check
|
||||
run: |
|
||||
if command -v pnpm &> /dev/null; then
|
||||
PNPM_VER=$(pnpm --version)
|
||||
echo "version=$PNPM_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found pnpm: $PNPM_VER"
|
||||
fi
|
||||
|
||||
- name: Install pnpm
|
||||
if: steps.pnpm-check.outputs.version == ''
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
@ -76,18 +106,48 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check for existing Go
|
||||
id: go-check
|
||||
run: |
|
||||
if command -v go &> /dev/null; then
|
||||
GO_VER=$(go version | grep -oP 'go\d+\.\d+' | head -1)
|
||||
echo "version=$GO_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Go: $(go version)"
|
||||
fi
|
||||
|
||||
- name: Setup Go
|
||||
if: steps.go-check.outputs.version == ''
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: true
|
||||
|
||||
- name: Check for existing Node.js
|
||||
id: node-check
|
||||
run: |
|
||||
if command -v node &> /dev/null; then
|
||||
NODE_VER=$(node --version)
|
||||
echo "version=$NODE_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Node.js: $NODE_VER"
|
||||
fi
|
||||
|
||||
- name: Setup Node.js
|
||||
if: steps.node-check.outputs.version == ''
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Check for existing pnpm
|
||||
id: pnpm-check
|
||||
run: |
|
||||
if command -v pnpm &> /dev/null; then
|
||||
PNPM_VER=$(pnpm --version)
|
||||
echo "version=$PNPM_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found pnpm: $PNPM_VER"
|
||||
fi
|
||||
|
||||
- name: Install pnpm
|
||||
if: steps.pnpm-check.outputs.version == ''
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@ -20,18 +20,48 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check for existing Go
|
||||
id: go-check
|
||||
run: |
|
||||
if command -v go &> /dev/null; then
|
||||
GO_VER=$(go version | grep -oP 'go\d+\.\d+' | head -1)
|
||||
echo "version=$GO_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Go: $(go version)"
|
||||
fi
|
||||
|
||||
- name: Setup Go
|
||||
if: steps.go-check.outputs.version == ''
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: true
|
||||
|
||||
- name: Check for existing Node.js
|
||||
id: node-check
|
||||
run: |
|
||||
if command -v node &> /dev/null; then
|
||||
NODE_VER=$(node --version)
|
||||
echo "version=$NODE_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Node.js: $NODE_VER"
|
||||
fi
|
||||
|
||||
- name: Setup Node.js
|
||||
if: steps.node-check.outputs.version == ''
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Check for existing pnpm
|
||||
id: pnpm-check
|
||||
run: |
|
||||
if command -v pnpm &> /dev/null; then
|
||||
PNPM_VER=$(pnpm --version)
|
||||
echo "version=$PNPM_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found pnpm: $PNPM_VER"
|
||||
fi
|
||||
|
||||
- name: Install pnpm
|
||||
if: steps.pnpm-check.outputs.version == ''
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install Go dependencies
|
||||
@ -59,7 +89,17 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check for existing Go
|
||||
id: go-check
|
||||
run: |
|
||||
if command -v go &> /dev/null; then
|
||||
GO_VER=$(go version | grep -oP 'go\d+\.\d+' | head -1)
|
||||
echo "version=$GO_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Go: $(go version)"
|
||||
fi
|
||||
|
||||
- name: Setup Go
|
||||
if: steps.go-check.outputs.version == ''
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
@ -85,12 +125,32 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check for existing Node.js
|
||||
id: node-check
|
||||
run: |
|
||||
if command -v node &> /dev/null; then
|
||||
NODE_VER=$(node --version)
|
||||
echo "version=$NODE_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found Node.js: $NODE_VER"
|
||||
fi
|
||||
|
||||
- name: Setup Node.js
|
||||
if: steps.node-check.outputs.version == ''
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Check for existing pnpm
|
||||
id: pnpm-check
|
||||
run: |
|
||||
if command -v pnpm &> /dev/null; then
|
||||
PNPM_VER=$(pnpm --version)
|
||||
echo "version=$PNPM_VER" >> $GITHUB_OUTPUT
|
||||
echo "Found pnpm: $PNPM_VER"
|
||||
fi
|
||||
|
||||
- name: Install pnpm
|
||||
if: steps.pnpm-check.outputs.version == ''
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
Loading…
Reference in New Issue
Block a user