Skip to content

Commit 59546ae

Browse files
committed
修复构建问题
1 parent 02bf08b commit 59546ae

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/go.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
go-version: ^1.20
3434

3535
- name: Build
36+
env:
37+
CF_API_KEY: ${{ secrets.CF_API_KEY }}
3638
run: bash ./build.sh
3739

3840
- name: Upload Build Artifact

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ set -e
33
git_hash=$(git rev-parse --short HEAD 2>/dev/null)
44
version="1.3.0-${git_hash}"
55
echo "Build: AutoInstall-${version}"
6-
go build -ldflags "-X main.gitversion=${version} -X github.com/autoinst/AutoInstall/pkg.cfapiKey=${{ secrets.CF_API_KEY }}" -o dist/$BUILD_NAME main.go
6+
go build -ldflags "-X main.gitversion=${version} -X github.com/autoinst/AutoInstall/pkg.cfapiKey=${CF_API_KEY}" -o dist/$BUILD_NAME main.go
77
ls dist

0 commit comments

Comments
 (0)