From 449c33a3abab761c8acd46d204322363da847e44 Mon Sep 17 00:00:00 2001 From: Dylan Brasseur Date: Wed, 28 Jun 2023 16:53:57 +0200 Subject: [PATCH] Added worker image selection --- deploy/action.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/deploy/action.yml b/deploy/action.yml index cf37a5c..7052990 100644 --- a/deploy/action.yml +++ b/deploy/action.yml @@ -13,9 +13,13 @@ inputs: required: false default: "" ext-csharp-version: - description: "Version of Extension Csharp to deploy" + description: "Version of worker to deploy" required: false default: "" + worker-image: + description: "Image for the worker" + required: false + default: "dockerhubaneo/armonik_worker_dll" prefix: description: "Prefix for the deployment" required: false @@ -81,6 +85,7 @@ runs: MTLS: ${{ inputs.mtls }} GENCERT: ${{ inputs.generate-client-cert }} CUSTOM_CA: ${{ inputs.custom-client-ca }} + WORKER: ${{ inputs.worker-image }} run: | set -ex ingress() { @@ -94,7 +99,16 @@ runs: mv .extra.tfvars.json extra.tfvars.json fi } + worker() { + local worker + worker="$1" + jq --arg worker "$worker" '.armonik_images.extcsharp=[$worker]' extra.tfvars.json > .extra.tfvars.json + mv .extra.tfvars.json extra.tfvars.json + } ingress "$TLS" "$MTLS" "$GENCERT" "$CUSTOM_CA" + jq -s '.[0] * .[1]' versions.tfvars.json extra.tfvars.json > .extra.tfvars.json + mv .extra.tfvars.json extra.tfvars.json + worker $WORKER - id: apply name: Apply shell: bash