ci: prevent accidental GOOS and GOARCH confusion in host go toolchain (#1632)

This commit is contained in:
Malte Poll 2023-04-12 11:05:05 +02:00 committed by GitHub
parent af9e03f66b
commit 52a1bb0a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -21,13 +21,13 @@ runs:
- name: Build cdbg
shell: bash
env:
GOOS: ${{ inputs.targetOS }}
GOARCH: ${{ inputs.targetArch }}
TARGET_GOOS: ${{ inputs.targetOS }}
TARGET_GOARCH: ${{ inputs.targetArch }}
OUTPUT_PATH: ${{ inputs.outputPath }}
run: |
echo "::group::Build cdbg"
mkdir -p "$(dirname "${OUTPUT_PATH}")"
label="//debugd/cmd/cdbg:cdbg_${GOOS}_${GOARCH}"
label="//debugd/cmd/cdbg:cdbg_${TARGET_GOOS}_${TARGET_GOARCH}"
bazel build "${label}"
repository_root=$(git rev-parse --show-toplevel)
out_rel=$(bazel cquery --output=files "${label}")

View File

@ -43,8 +43,8 @@ runs:
- name: Build CLI
shell: bash
env:
GOOS: ${{ inputs.targetOS }}
GOARCH: ${{ inputs.targetArch }}
TARGET_GOOS: ${{ inputs.targetOS }}
TARGET_GOARCH: ${{ inputs.targetArch }}
OUTPUT_PATH: ${{ inputs.outputPath || format('./build/constellation-{0}-{1}', inputs.targetOS, inputs.targetArch) }}
run: |
echo "::group::Build CLI"
@ -55,7 +55,7 @@ runs:
else
cli_variant=oss
fi
label="//cli:cli_${cli_variant}_${GOOS}_${GOARCH}"
label="//cli:cli_${cli_variant}_${TARGET_GOOS}_${TARGET_GOARCH}"
bazel build "${label}"
repository_root=$(git rev-parse --show-toplevel)
out_rel=$(bazel cquery --output=files "${label}")