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:
2025-12-20 17:01:07 +03:00
parent 8900d95e6e
commit d052055aa0

View File

@@ -5,15 +5,14 @@ inputs:
weld-version: weld-version:
description: 'The version of weld to install (e.g., v0.2.0). Defaults to the latest release.' description: 'The version of weld to install (e.g., v0.2.0). Defaults to the latest release.'
required: false required: false
default: 'latest' # Use 'latest' as a special keyword default: 'latest'
repo: repo:
description: 'The repository where the weld CLI is released, in owner/repo format.' description: 'The repository where the weld CLI is released, in owner/repo format.'
required: false required: false
default: Xenox-Incorporated-Industries/weld default: Xenox-Incorporated-Industries/weld
github-token: token:
description: 'GitHub token for downloading from a private repository. The default token is usually sufficient within the same organization.' description: 'A GitHub token with read access to the weld repository releases.'
required: false required: true
default: ${{ github.token }}
branding: branding:
icon: 'anchor' icon: 'anchor'
@@ -26,7 +25,7 @@ runs:
id: get_version id: get_version
shell: bash shell: bash
env: env:
GH_TOKEN: ${{ inputs.github-token }} GH_TOKEN: ${{ inputs.token }}
run: | run: |
VERSION_TAG="" VERSION_TAG=""
if [[ "${{ inputs.weld-version }}" == "latest" ]]; then if [[ "${{ inputs.weld-version }}" == "latest" ]]; then
@@ -43,7 +42,7 @@ runs:
- name: Download Weld CLI - name: Download Weld CLI
shell: bash shell: bash
env: env:
GH_TOKEN: ${{ inputs.github-token }} GH_TOKEN: ${{ inputs.token }}
run: | run: |
echo "Downloading weld version '${{ inputs.weld-version }}' from repo '${{ inputs.repo }}'..." echo "Downloading weld version '${{ inputs.weld-version }}' from repo '${{ inputs.repo }}'..."
gh release download ${{ steps.get_version.outputs.tag }} \ gh release download ${{ steps.get_version.outputs.tag }} \