elysium-actions/action.yml

63 lines
2.4 KiB
YAML
Raw Normal View History

2024-02-14 22:04:41 -07:00
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
echo OASIS_ENV_STRATEGY=${{ inputs.deploy-env }} >> $GITHUB_ENV
2024-02-15 10:31:21 -07:00
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
2024-02-14 22:04:41 -07:00
# Set additional Envars
- name: Setup Oasis Envars
uses: https://gitea.dunemask.dev/elysium/elysium-actions@infisical-env
with:
2024-02-15 10:31:21 -07:00
infisical-token: ${{ env.OASIS_INFISICAL_TOKEN }}
environment: ${{ env.OASIS_ENV_STRATEGY}}
secret-path: ${{ env.OASIS_INFISICAL_WORKFLOW }}
2024-02-14 22:04:41 -07:00
2024-02-15 10:31:21 -07:00
- name: Configure Kubeconfig
shell: bash
echo OASIS_ENV_STRATEGY=${{ inputs.deploy-env }} >> $GITHUB_ENV
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:
2024-02-15 10:36:39 -07:00
garden-version: ${{ inputs.garden-version }}
oasis-branch: ${{ inputs.oasis-branch }}
oasis-workspace: ${{ inputs.oasis-workspace }}
2024-02-15 10:31:21 -07:00
kubeconfig: ${{ env.OASIS_WORKFLOW_KUBECONFIG }}
2024-02-14 22:04:41 -07:00