Skip to content

Commit

Permalink
fix: Resolve issues with setup-python and config management (#1)
Browse files Browse the repository at this point in the history
* Resolve issues with setup-python

* Use LINODE_CLI_TOKEN

* Mask token
  • Loading branch information
lgarber-akamai authored Apr 26, 2023
1 parent ecbaeb4 commit e8752ed
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
python-version: '3.x'

- name: Determine CLI install extension
id: determine_install_version
Expand All @@ -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 <<EOF > ~/.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 != '' }}
Expand Down

0 comments on commit e8752ed

Please sign in to comment.