Skip to content

Commit db2a37e

Browse files
authored
enable configurables for the cli os/arch (#2311)
1 parent b1ea380 commit db2a37e

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

action.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ inputs:
236236
description: "Pre-compiled version of digger CLI to install. Must correspond to a valid release tag (vX.Y.Z). This value overrides the version derived from the github.action_ref."
237237
required: false
238238
default: ""
239+
digger-os:
240+
description: "OS variant of the digger CLI to install. Valid configurable values are: windows, linux, darwin, freebsd."
241+
required: false
242+
default: "Linux"
243+
digger-arch:
244+
description: "Architecture of the digger CLI to install. Valid configurable values are: amd64, arm64, 386."
245+
required: false
246+
default: "X64"
239247

240248
outputs:
241249
output:
@@ -517,6 +525,8 @@ runs:
517525
if: ${{ steps.determine-binary-mode.outputs.binary-mode == 'prebuilt' }}
518526
env:
519527
DIGGER_VERSION: ${{ inputs.digger-version || github.action_ref }}
528+
DIGGER_OS: ${{ inputs.digger-os }}
529+
DIGGER_ARCH: ${{ inputs.digger-arch }}
520530
PLAN_UPLOAD_DESTINATION: ${{ inputs.upload-plan-destination }}
521531
PLAN_UPLOAD_S3_ENCRYPTION_ENABLED: ${{ inputs.upload-plan-destination-s3-encryption-enabled }}
522532
PLAN_UPLOAD_S3_ENCRYPTION_TYPE: ${{ inputs.upload-plan-destination-s3-encryption-type }}
@@ -557,12 +567,12 @@ runs:
557567
558568
if [[ ${{ inputs.ee }} == "true" ]]; then
559569
if [[ ${{ inputs.fips }} == "true" ]]; then
560-
DOWNLOAD_URL="https://github.com/diggerhq/digger/releases/download/${DIGGER_VERSION}/digger-ee-cli-${{ runner.os }}-${{ runner.arch }}-fips"
570+
DOWNLOAD_URL="https://github.com/diggerhq/digger/releases/download/${DIGGER_VERSION}/digger-ee-cli-${DIGGER_OS}-${DIGGER_ARCH}-fips"
561571
else
562-
DOWNLOAD_URL="https://github.com/diggerhq/digger/releases/download/${DIGGER_VERSION}/digger-ee-cli-${{ runner.os }}-${{ runner.arch }}"
572+
DOWNLOAD_URL="https://github.com/diggerhq/digger/releases/download/${DIGGER_VERSION}/digger-ee-cli-${DIGGER_OS}-${DIGGER_ARCH}"
563573
fi
564574
else
565-
DOWNLOAD_URL="https://github.com/diggerhq/digger/releases/download/${DIGGER_VERSION}/digger-cli-${{ runner.os }}-${{ runner.arch }}"
575+
DOWNLOAD_URL="https://github.com/diggerhq/digger/releases/download/${DIGGER_VERSION}/digger-cli-${DIGGER_OS}-${DIGGER_ARCH}"
566576
fi
567577
568578
echo "Downloading from: $DOWNLOAD_URL"

0 commit comments

Comments
 (0)