name: Oasis Auto Config Action description: Configure env for deploying apps using Oasis Automagically inputs: deploy-env: description: Deploy Environment (ci or edge) required: true garden-version: description: Version of Garden to deploy required: false oasis-branch: description: Branch of Oasis to use required: false default: master oasis-workspace: descipriont: Workspace to setup Oasis required: false runs: using: composite steps: - name: Configure Workflow shell: bash run: >- echo OASIS_ENV_STRATEGY=${{ inputs.deploy-env }} >> $GITHUB_ENV if [ ${{ inputs.deploy-env }} == "edge" ]; then echo OASIS_INFISICAL_TOKEN=${{ secrets.INFISICAL_ELYSIUM_PROD_READ_TOKEN }} >> $GITHUB_ENV echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-edge-deploy >> $GITHUB_ENV elif [ ${{ inputs.deploy-env }} == "ci" ]; then echo OASIS_INFISICAL_TOKEN=${{ secrets.INFISICAL_ELYSIUM_PROD_READ_TOKEN }} >> $GITHUB_ENV echo OASIS_INFISICAL_WORKFLOW=/workflows/oasis-edge-deploy >> $GITHUB_ENV else echo "Error! deploy-env required, and must be 'ci' or 'edge'!" exit 1 fi - name: Setup Oasis Envars uses: https://gitea.dunemask.dev/elysium/elysium-actions@infisical-env with: infisical-token: ${{ env.OASIS_INFISICAL_TOKEN }} environment: ${{ env.OASIS_ENV_STRATEGY}} secret-path: ${{ env.OASIS_INFISICAL_WORKFLOW }} - name: Configure Kubeconfig shell: bash run: >- if [ ${{ inputs.deploy-env }} == "edge" ]; then echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_DEV}} >> $GITHUB_ENV elif [ ${{ inputs.deploy-env }} == "ci" ]; then echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_EDGE}} >> $GITHUB_ENV else echo "Error! deploy-env required, and must be 'ci' or 'edge'!" exit 1 fi - name: Oasis Setup uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-advanced with: garden-version: ${{ inputs.garden-version }} oasis-branch: ${{ inputs.oasis-branch }} oasis-workspace: ${{ inputs.oasis-workspace }} kubeconfig: ${{ env.OASIS_WORKFLOW_KUBECONFIG }}