[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:
|
kubeconfig:
|
||||||
description: Kubeconfig for Oasis
|
description: Kubeconfig for Oasis
|
||||||
required: false
|
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:
|
garden-version:
|
||||||
description: Version of Garden to deploy
|
description: Version of Garden to deploy
|
||||||
required: false
|
required: false
|
||||||
|
@ -26,22 +32,24 @@ runs:
|
||||||
- name: Configure Workflow
|
- name: Configure Workflow
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
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
|
elif [ ${{ inputs.deploy-env }} == "ci" ]; then
|
||||||
echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-ci-deploy >> $GITHUB_ENV
|
WORKFLOW_SECRET=/workflows/oasis-ci-deploy
|
||||||
else
|
else
|
||||||
echo "Error! deploy-env required, and must be 'ci' or 'edge'!"
|
echo "Error! deploy-env required, and must be 'ci' or 'edge'!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
- name: Setup Oasis Envars
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@infisical-env
|
uses: https://gitea.dunemask.dev/elysium/elysium-actions@infisical-env
|
||||||
with:
|
with:
|
||||||
infisical-token: ${{ env.OASIS_INFISICAL_TOKEN }}
|
infisical-token: ${{ env.OASIS_INFISICAL_TOKEN }}
|
||||||
environment: ${{ inputs.deploy-env }}
|
envs: ${{ env.OASIS_ENV_FETCH }}
|
||||||
secret-path: ${{ env.OASIS_INFISICAL_WORKFLOW }}
|
secret-paths: ${{ env.OASIS_PATH_FETCH }}
|
||||||
- name: Configure Kubeconfig
|
- name: Configure Kubeconfig
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue