Deploy #73
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_call: | |
inputs: | |
environment: | |
description: The name of the environment to deploy to (dev/prod) | |
type: string | |
required: true | |
version: | |
description: The image version to deploy | |
type: string | |
required: true | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: Environment | |
type: choice | |
required: true | |
options: | |
- development | |
- production | |
version: | |
description: Image version | |
type: string | |
required: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
environment: | |
name: ${{ inputs.environment }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/get-env-details | |
id: env | |
with: | |
environment: ${{ inputs.environment }} | |
# - name: Set Kubernetes Namespace secrets | |
# id: set_namespace_secrets | |
# run: | | |
# if [[ "${{ inputs.environment }}" == "development" ]]; then | |
# api=https://"{{ secrets.DEVELOPMENT_KUBE_CLUSTER }}" | |
# cert="${{ secrets.DEVELOPMENT_KUBE_CERT }}" | |
# cluster="${{ secrets.DEVELOPMENT_KUBE_CLUSTER }}" | |
# namespace="${{ secrets.DEVELOPMENT_KUBE_NAMESPACE }}" | |
# token="${{ secrets.DEVELOPMENT_KUBE_TOKEN }}" | |
# bash ./.github/actions/cloud-platform-deploy | |
# elif [[ "${{ inputs.environment }}" == "production" ]]; then | |
# api=https://"{{ secrets.PRODUCTION_KUBE_CLUSTER }}" | |
# cert="${{ secrets.PRODUCTION_KUBE_CERT }}" | |
# cluster="${{ secrets.PRODUCTION_KUBE_CLUSTER }}" | |
# namespace="${{ secrets.PRODUCTION_KUBE_NAMESPACE }}" | |
# token="${{ secrets.PRODUCTION_KUBE_TOKEN }}" | |
# else | |
# echo "Invalid Github environment/namespace specified: ${{ inputs.environment }}" | |
# exit 1 | |
# fi | |
- name: Deploy to Platform | |
# if: ${{ steps.check_files.outputs.files_exists == 'true' && steps.enabled.outputs.enabled == 'true' }} | |
uses: ./.github/actions/cloud-platform-deploy | |
with: | |
environment: ${{ inputs.environment }} | |
version: ${{ inputs.version }} | |
api: https://${{ secrets.KUBE_CLUSTER }} | |
cert: ${{ secrets.KUBE_CERT }} | |
cluster: ${{ secrets.KUBE_CLUSTER }} | |
namespace: ${{ secrets.KUBE_NAMESPACE }} | |
token: ${{ secrets.KUBE_TOKEN }} | |
# - name: Deploy to Prod | |
# # if: ${{ steps.check_files.outputs.files_exists == 'true' && steps.enabled.outputs.enabled == 'true' }} | |
# uses: ./.github/actions/cloud-platform-deploy | |
# with: | |
# environment: ${{ inputs.environment }} | |
# version: ${{ inputs.version }} | |
# api: https://${{ secrets.PRODUCTION_KUBE_CLUSTER }} | |
# cert: ${{ secrets.PRODUCTION_KUBE_CERT }} | |
# cluster: ${{ secrets.PRODUCTION_KUBE_CLUSTER }} | |
# namespace: ${{ secrets.PRODUCTION_KUBE_NAMESPACE }} | |
# token: ${{ secrets.PRODUCTION_KUBE_TOKEN }} | |
# jobs: | |
# deploy: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# fail-fast: false | |
# environment: | |
# name: ${{ inputs.github_environment }} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: ./.github/actions/get-env-details | |
# id: env | |
# with: | |
# environment: ${{ inputs.environment }} | |
# - name: Set Kubernetes Namespace secrets | |
# id: set_namespace_secrets | |
# run: | | |
# case "${{ }}" | |
# uses: ./.github/actions/cloud-platform-deploy | |
# with: | |
# environment: ${{ inputs.environment }} | |
# version: ${{ inputs.version }} | |
# api: https://${{ secrets.DEVELOPMENT_KUBE_CLUSTER }} | |
# cert: ${{ secrets.DEVELOPMENT_KUBE_CERT }} | |
# cluster: ${{ secrets.DEVELOPMENT_KUBE_CLUSTER }} | |
# namespace: ${{ secrets.DEVELOPMENT_KUBE_NAMESPACE }} | |
# token: ${{ secrets.DEVELOPMENT_KUBE_TOKEN }} | |