[FEATURE] Auto Oasis Test
This commit is contained in:
parent
d06cddc696
commit
334a647253
1 changed files with 14 additions and 6 deletions
20
action.yml
20
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-type>-deploy, ...extra-secret-paths
|
||||
echo OASIS_ENV_FETCH=${{ inputs.deploy-env }},${{ inputs.extra-secret-envs }} #<deploy-type>, ...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: |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue