[FEATURE] Auto Oasis Test
This commit is contained in:
parent
a18f49543e
commit
e4cd795081
1 changed files with 35 additions and 40 deletions
75
action.yml
75
action.yml
|
@ -1,55 +1,53 @@
|
||||||
name: 'Oasis Auto Config Action'
|
name: Oasis Auto Config Action
|
||||||
description: 'Configure env for deploying apps using Oasis Automagically'
|
description: Configure env for deploying apps using Oasis Automagically
|
||||||
inputs:
|
inputs:
|
||||||
deploy-env:
|
deploy-env:
|
||||||
description: 'Deploy Environment (ci or edge)'
|
description: Deploy Environment (ci or edge)
|
||||||
required: true
|
required: true
|
||||||
garden-version:
|
garden-version:
|
||||||
description: 'Version of Garden to deploy'
|
description: Version of Garden to deploy
|
||||||
required: false
|
required: false
|
||||||
oasis-branch:
|
oasis-branch:
|
||||||
description: 'Branch of Oasis to use'
|
description: Branch of Oasis to use
|
||||||
required: false
|
required: false
|
||||||
default: master
|
default: master
|
||||||
oasis-workspace:
|
oasis-workspace:
|
||||||
descipriont: 'Workspace to setup Oasis'
|
descipriont: Workspace to setup Oasis
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Configure Workflow
|
- name: Configure Workflow
|
||||||
shell: bash
|
shell: bash
|
||||||
echo OASIS_ENV_STRATEGY=${{ inputs.deploy-env }} >> $GITHUB_ENV
|
run: >-
|
||||||
if [ ${{ inputs.deploy-env }} == "edge" ]; then
|
echo OASIS_ENV_STRATEGY=${{ inputs.deploy-env }} >> $GITHUB_ENV
|
||||||
echo OASIS_INFISICAL_TOKEN=${{ secrets.INFISICAL_ELYSIUM_PROD_READ_TOKEN }} >> $GITHUB_ENV
|
if [ ${{ inputs.deploy-env }} == "edge" ]; then
|
||||||
echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-edge-deploy >> $GITHUB_ENV
|
echo OASIS_INFISICAL_TOKEN=${{ secrets.INFISICAL_ELYSIUM_PROD_READ_TOKEN }} >> $GITHUB_ENV
|
||||||
elif [ ${{ inputs.deploy-env }} == "ci" ]; then
|
echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-edge-deploy >> $GITHUB_ENV
|
||||||
echo OASIS_INFISICAL_TOKEN=${{ secrets.INFISICAL_ELYSIUM_PROD_READ_TOKEN }} >> $GITHUB_ENV
|
elif [ ${{ inputs.deploy-env }} == "ci" ]; then
|
||||||
echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-edge-deploy >> $GITHUB_ENV
|
echo OASIS_INFISICAL_TOKEN=${{ secrets.INFISICAL_ELYSIUM_PROD_READ_TOKEN }} >> $GITHUB_ENV
|
||||||
else
|
echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-edge-deploy >> $GITHUB_ENV
|
||||||
echo "Error! deploy-env required, and must be 'ci' or 'edge'!"
|
else
|
||||||
exit 1
|
echo "Error! deploy-env required, and must be 'ci' or 'edge'!"
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
# Set additional Envars
|
|
||||||
- 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: ${{ env.OASIS_ENV_STRATEGY}}
|
environment: ${{ env.OASIS_ENV_STRATEGY}}
|
||||||
secret-path: ${{ env.OASIS_INFISICAL_WORKFLOW }}
|
secret-path: ${{ env.OASIS_INFISICAL_WORKFLOW }}
|
||||||
|
|
||||||
- name: Configure Kubeconfig
|
- name: Configure Kubeconfig
|
||||||
shell: bash
|
shell: bash
|
||||||
echo OASIS_ENV_STRATEGY=${{ inputs.deploy-env }} >> $GITHUB_ENV
|
run: >-
|
||||||
if [ ${{ inputs.deploy-env }} == "edge" ]; then
|
if [ ${{ inputs.deploy-env }} == "edge" ]; then
|
||||||
echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_DEV}} >> $GITHUB_ENV
|
echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_DEV}} >> $GITHUB_ENV
|
||||||
elif [ ${{ inputs.deploy-env }} == "ci" ]; then
|
elif [ ${{ inputs.deploy-env }} == "ci" ]; then
|
||||||
echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_EDGE}} >> $GITHUB_ENV
|
echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_EDGE}} >> $GITHUB_ENV
|
||||||
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
|
||||||
- name: Oasis Setup
|
- name: Oasis Setup
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-advanced
|
uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-advanced
|
||||||
with:
|
with:
|
||||||
|
@ -57,6 +55,3 @@ runs:
|
||||||
oasis-branch: ${{ inputs.oasis-branch }}
|
oasis-branch: ${{ inputs.oasis-branch }}
|
||||||
oasis-workspace: ${{ inputs.oasis-workspace }}
|
oasis-workspace: ${{ inputs.oasis-workspace }}
|
||||||
kubeconfig: ${{ env.OASIS_WORKFLOW_KUBECONFIG }}
|
kubeconfig: ${{ env.OASIS_WORKFLOW_KUBECONFIG }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue