build: bandaid for action-go-build clean flag (#21217)

This commit is contained in:
Dan Stough 2024-05-24 14:54:54 -04:00 committed by GitHub
parent d2b107ffe5
commit f70fcab2ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -132,7 +132,7 @@ jobs:
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }} PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }}
CGO_ENABLED: "0" CGO_ENABLED: "0"
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}" GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}"
uses: hashicorp/actions-go-build@v1 uses: hashicorp/actions-go-build@make-clean-flag-optional
with: with:
product_name: ${{ env.PKG_NAME }} product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version.outputs.product-version }} product_version: ${{ needs.set-product-version.outputs.product-version }}
@ -140,6 +140,7 @@ jobs:
os: ${{ matrix.goos }} os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }} arch: ${{ matrix.goarch }}
reproducible: report reproducible: report
clean: false
instructions: |- instructions: |-
cp LICENSE $TARGET_DIR/LICENSE.txt cp LICENSE $TARGET_DIR/LICENSE.txt
go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
@ -232,7 +233,7 @@ jobs:
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }} PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }}
CGO_ENABLED: "0" CGO_ENABLED: "0"
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}" GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}"
uses: hashicorp/actions-go-build@v1 uses: hashicorp/actions-go-build@make-clean-flag-optional
with: with:
product_name: ${{ env.PKG_NAME }} product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version.outputs.product-version }} product_version: ${{ needs.set-product-version.outputs.product-version }}
@ -240,6 +241,7 @@ jobs:
os: ${{ matrix.goos }} os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }} arch: ${{ matrix.goarch }}
reproducible: report reproducible: report
clean: false
instructions: |- instructions: |-
cp LICENSE $TARGET_DIR/LICENSE.txt cp LICENSE $TARGET_DIR/LICENSE.txt
go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false go build -ldflags="$GOLDFLAGS" -o "$BIN_PATH" -trimpath -buildvcs=false
@ -283,7 +285,7 @@ jobs:
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }} PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }}
CGO_ENABLED: "0" CGO_ENABLED: "0"
GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}" GOLDFLAGS: "${{needs.set-product-version.outputs.shared-ldflags}}"
uses: hashicorp/actions-go-build@v1 uses: hashicorp/actions-go-build@make-clean-flag-optional
with: with:
product_name: ${{ env.PKG_NAME }} product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.set-product-version.outputs.product-version }} product_version: ${{ needs.set-product-version.outputs.product-version }}
@ -291,6 +293,7 @@ jobs:
os: ${{ matrix.goos }} os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }} arch: ${{ matrix.goarch }}
reproducible: report reproducible: report
clean: false
instructions: |- instructions: |-
cp LICENSE $TARGET_DIR/LICENSE.txt cp LICENSE $TARGET_DIR/LICENSE.txt
go build -ldflags="$GOLDFLAGS" -tags netcgo -o "$BIN_PATH" -trimpath -buildvcs=false go build -ldflags="$GOLDFLAGS" -tags netcgo -o "$BIN_PATH" -trimpath -buildvcs=false