Skip to content

Commit

Permalink
Add new skip-inputs & bump CLI (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx authored Oct 30, 2024
1 parent 69aa510 commit affef66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ runs:
- name: Install 3lv CLI
uses: 3lvia/cli/setup@trunk
with:
version: '0.14.4' # TODO: remove this (which will get latest version) when 3lv CLI is stable
version: '0.15.0' # TODO: remove this (which will get latest version) when 3lv CLI is stable

- name: Handle deprecated inputs
shell: bash
Expand Down
14 changes: 12 additions & 2 deletions deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ inputs:
description: 'If `true`, the action will skip authentication with the cloud provider.'
required: false
default: 'false'
skip-setup-gke-auth-plugin:
description: 'If `true`, the action will skip setting up the Google Cloud SDK and GKE auth plugin.'
required: false
default: 'false'
skip-getting-credentials:
description: 'If `true`, the action will skip getting credentials from the cloud provider for the Kubernetes cluster.'
required: false
default: 'false'
AZURE_CLIENT_ID:
description: 'Client ID of a service principal that has access to AKS. Only required for deploying to AKS.'
required: false
Expand Down Expand Up @@ -124,7 +132,7 @@ runs:

- name: Setup Google Cloud CLI with GKE auth plugin if not on Elvia runner
uses: google-github-actions/[email protected]
if: ${{ inputs.runtime-cloud-provider == 'GKE' && !startsWith(runner.name, 'elvia-runner-') }}
if: ${{ inputs.runtime-cloud-provider == 'GKE' && (!startsWith(runner.name, 'elvia-runner-') && inputs.skip-setup-gke-auth-plugin == 'false') }}
with:
install_components: 'gke-gcloud-auth-plugin'

Expand All @@ -143,7 +151,7 @@ runs:
- name: Install 3lv CLI
uses: 3lvia/cli/setup@trunk
with:
version: '0.14.4' # TODO: remove this (which will get latest version) when 3lv CLI is stable
version: '0.15.0' # TODO: remove this (which will get latest version) when 3lv CLI is stable

- name: Deploy
shell: bash
Expand Down Expand Up @@ -171,6 +179,8 @@ runs:
3LV_GKE_CLUSTER_NAME: ${{ inputs.GKE_CLUSTER_NAME }}
3LV_GKE_CLUSTER_LOCATION: ${{ inputs.GKE_CLUSTER_LOCATION }}
3LV_GKE_USE_INTERNAL_IP: ${{ inputs.GKE_USE_INTERNAL_IP }}
3LV_SKIP_AUTHENTICATION: ${{ inputs.skip-authentication }}
3LV_SKIP_GETTING_CREDENTIALS: ${{ inputs.skip-getting-credentials }}

- name: Notify Slack on failure
if: ${{ failure() && inputs.slack-channel != '' }}
Expand Down

0 comments on commit affef66

Please sign in to comment.