Skip to content

Commit

Permalink
Resolve merge conflict by incorporating both suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
0pens0 committed Aug 21, 2024
1 parent e57f7a9 commit 3aaffe9
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/actions/tanzu-cli-plugins/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'tanzu-cli plugin install'
description: 'Installing plugin for TANZU CLI'
inputs:
name:
description: 'Name of the plugin to install'
required: true
target:
description: 'Target of the plugin'
default: global
version:
description: 'Version of the TANZU CLI Plugin to install'
default: 'latest'
runs:
using: "composite"
steps:
- name: Install Tanzu CLI Plugin
shell: bash
env:
PLUGIN_NAME: ${{ inputs.name }}
PLUGIN_VERSION: ${{ inputs.version }}
PLUGIN_TARGET: ${{ inputs.target }}
run: install.sh
2 changes: 2 additions & 0 deletions .github/actions/tanzu-cli-plugins/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Install Tanzu plugin
tanzu plugin install --target $PLUGIN_TARGET $PLUGIN_NAME -v $PLUGIN_VERSION
14 changes: 14 additions & 0 deletions .github/actions/tanzu-cli/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'tanzu-cli install'
description: 'Installing the base TANZU CLI'
inputs:
version:
description: 'Version of the TANZU CLI to install'
default: 'latest'
runs:
using: "composite"
steps:
- name: Install Tanzu CLI
shell: bash
env:
TANZU_CLI_VERSION: ${{ inputs.version }}
run: install.sh
12 changes: 12 additions & 0 deletions .github/actions/tanzu-cli/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Install Tanzu CLI and initialize
curl -Lo tanzu-cli-linux-amd64.tar.gz https://github.com/vmware-tanzu/tanzu-cli/releases/download/${TANZU_CLI_VERSION}/tanzu-cli-linux-amd64.tar.gz
curl -Lo tanzu-cli-binaries-checksums.txt https://github.com/vmware-tanzu/tanzu-cli/releases/download/${TANZU_CLI_VERSION}/tanzu-cli-binaries-checksums.txt

if [ "$(cat tanzu-cli-binaries-checksums.txt | grep tanzu-cli-linux-amd64.tar.gz)" != "$(sha256sum tanzu-cli-linux-amd64.tar.gz)" ]; then echo "Checksum does not match"; exit 1; fi

tar -xf tanzu-cli-linux-amd64.tar.gz
mv ${TANZU_CLI_VERSION}/tanzu-cli-linux_amd64 /usr/local/bin/tanzu
tanzu ceip-participation set false
tanzu config eula accept
tanzu init
tanzu version
19 changes: 19 additions & 0 deletions .github/actions/tanzu-login/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'tanzu login'
description: 'Login the user'
inputs:
api-token:
description: 'Token used to login with the CLI'
required: true
endpoint:
description: 'Endpoint to authenticate against'
default: 'console.cloud.vmware.com'
runs:
using: "composite"
steps:
- name: Login
shell: bash
env:
TANZU_API_TOKEN: ${{ inputs.api-token }}
ENDPOINT: ${{ inputs.endpoint }}
run: |
tanzu login --endpoint ${ENDPOINT}

0 comments on commit 3aaffe9

Please sign in to comment.