From e8752ed165037e5fa726df38db787e74bb745237 Mon Sep 17 00:00:00 2001 From: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Date: Wed, 26 Apr 2023 14:40:04 -0400 Subject: [PATCH] fix: Resolve issues with `setup-python` and config management (#1) * Resolve issues with setup-python * Use LINODE_CLI_TOKEN * Mask token --- action.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 3fc50d1..ab31fc4 100644 --- a/action.yml +++ b/action.yml @@ -13,8 +13,14 @@ inputs: runs: using: 'composite' steps: + - name: Mask the input token + shell: bash + run: echo "::add-mask::${{ inputs.token }}" + - name: Setup Python 3 uses: actions/setup-python@v4.5.0 + with: + python-version: '3.x' - name: Determine CLI install extension id: determine_install_version @@ -30,17 +36,13 @@ runs: VERSION: ${{ inputs.version }} - name: Install the Linode CLI - run: pip install linode-cli${{ env.version_extension }} + run: pip3 install linode-cli${{ env.version_extension }} shell: bash - - name: Configure the CLI + - name: Expose the Linode Token to the runner environment if: ${{ inputs.token != '' }} shell: bash - run: | - cat < ~/.config/linode-cli - [DEFAULT] - token = ${{ inputs.token }} - EOF + run: echo "LINODE_CLI_TOKEN=${{ inputs.token }}" >> "$GITHUB_ENV" - name: Validate the CLI is installed if: ${{ inputs.token != '' }}