From 3de67d32885292256bfe2a858e94ec1dddcc23ee Mon Sep 17 00:00:00 2001 From: Adrian Riobo Date: Wed, 11 Dec 2024 13:26:59 +0100 Subject: [PATCH] chore: set pull-secret parameter not mandatory Pull secret is only required for openshift and microshift, this commit will remove the required policy on it checking to avoid adding a fake pull secret for okd. Also in case the preset requires the pull secret and it is not set the action will throw and error Signed-off-by: Adrian Riobo --- action.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index bf8e115..4a1b775 100644 --- a/action.yml +++ b/action.yml @@ -3,8 +3,7 @@ description: 'Run OpenShift/Microshift cluster using GH action' inputs: pull-secret: description: 'pull-secret in case running OCP/Microshift.' - required: true - default: '{"auths":{"fake":{"auth": "Zm9vOmJhcgo="}}}' + default: '' preset: description: 'preset to use for CRC microshift/okd/openshift (default microshift).' required: true @@ -27,6 +26,14 @@ runs: run: | echo "::error title=⛔ error hint::Support Linux Only" exit 1 + - name: Check pull-secret + if: | + (inputs.preset == 'microshift' || inputs.preset == 'openshift') && + inputs.pull-secret == '' + shell: bash + run: | + echo "::error title=⛔ error hint::For preset ${{ inputs.preset }} pull-secret is required" + exit 1 - name: Download CRC shell: bash run: |