From 334a647253ee7c34e38f3d95b01149d996c1bdd1 Mon Sep 17 00:00:00 2001 From: Dunemask Date: Thu, 15 Feb 2024 17:50:51 -0700 Subject: [PATCH] [FEATURE] Auto Oasis Test --- action.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 1099629..0157df8 100644 --- a/action.yml +++ b/action.yml @@ -10,6 +10,12 @@ inputs: kubeconfig: description: Kubeconfig for Oasis required: false + extra-secret-paths: + description: Additional Secrets to fetch + required: false + extra-secret-envs: + description: Additional Envs for secrets to fetch + required: false garden-version: description: Version of Garden to deploy required: false @@ -26,22 +32,24 @@ runs: - name: Configure Workflow shell: bash run: | - echo OASIS_ENV_STRATEGY=${{ inputs.deploy-env }} >> $GITHUB_ENV - echo OASIS_INFISICAL_TOKEN=${{ inputs.infisical-token }} >> $GITHUB_ENV if [ ${{ inputs.deploy-env }} == "edge" ]; then - echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-edge-deploy >> $GITHUB_ENV + WORKFLOW_SECRET=/workflows/oasis-edge-deploy elif [ ${{ inputs.deploy-env }} == "ci" ]; then - echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-ci-deploy >> $GITHUB_ENV + WORKFLOW_SECRET=/workflows/oasis-ci-deploy else echo "Error! deploy-env required, and must be 'ci' or 'edge'!" exit 1 fi + # Save Envars + echo OASIS_INFISICAL_TOKEN=${{ inputs.infisical-token }} >> $GITHUB_ENV + echo OASIS_PATH_FETCH=$WORKFLOW_SECRET,${{ inputs.extra-secret-paths }} # /workflows/oasis--deploy, ...extra-secret-paths + echo OASIS_ENV_FETCH=${{ inputs.deploy-env }},${{ inputs.extra-secret-envs }} #, ...extra-secret-envs - name: Setup Oasis Envars uses: https://gitea.dunemask.dev/elysium/elysium-actions@infisical-env with: infisical-token: ${{ env.OASIS_INFISICAL_TOKEN }} - environment: ${{ inputs.deploy-env }} - secret-path: ${{ env.OASIS_INFISICAL_WORKFLOW }} + envs: ${{ env.OASIS_ENV_FETCH }} + secret-paths: ${{ env.OASIS_PATH_FETCH }} - name: Configure Kubeconfig shell: bash run: |