-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Resolve issues with
setup-python
and config management (#1)
* Resolve issues with setup-python * Use LINODE_CLI_TOKEN * Mask token
- Loading branch information
1 parent
ecbaeb4
commit e8752ed
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 != '' }} | ||
|