feat(action): add required token input for authentication
Introduces a new required 'token' input to the action. This token will be used for all GitHub API interactions, ensuring clear and explicit authentication, especially when accessing private repositories or repositories outside the current workflow's scope. This change replaces the previous 'github-token' and 'weld-repo-token' inputs with a single, mandatory 'token' input, making the action's authentication requirements unambiguous.
This commit is contained in:
13
action.yml
13
action.yml
@@ -5,15 +5,14 @@ inputs:
|
||||
weld-version:
|
||||
description: 'The version of weld to install (e.g., v0.2.0). Defaults to the latest release.'
|
||||
required: false
|
||||
default: 'latest' # Use 'latest' as a special keyword
|
||||
default: 'latest'
|
||||
repo:
|
||||
description: 'The repository where the weld CLI is released, in owner/repo format.'
|
||||
required: false
|
||||
default: Xenox-Incorporated-Industries/weld
|
||||
github-token:
|
||||
description: 'GitHub token for downloading from a private repository. The default token is usually sufficient within the same organization.'
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
token:
|
||||
description: 'A GitHub token with read access to the weld repository releases.'
|
||||
required: true
|
||||
|
||||
branding:
|
||||
icon: 'anchor'
|
||||
@@ -26,7 +25,7 @@ runs:
|
||||
id: get_version
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ inputs.github-token }}
|
||||
GH_TOKEN: ${{ inputs.token }}
|
||||
run: |
|
||||
VERSION_TAG=""
|
||||
if [[ "${{ inputs.weld-version }}" == "latest" ]]; then
|
||||
@@ -43,7 +42,7 @@ runs:
|
||||
- name: Download Weld CLI
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ inputs.github-token }}
|
||||
GH_TOKEN: ${{ inputs.token }}
|
||||
run: |
|
||||
echo "Downloading weld version '${{ inputs.weld-version }}' from repo '${{ inputs.repo }}'..."
|
||||
gh release download ${{ steps.get_version.outputs.tag }} \
|
||||
|
||||
Reference in New Issue
Block a user