mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 15:10:27 +00:00
Set GITHUB_TOKEN for cargo-binstall by default (#556)
Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
@@ -46,6 +46,7 @@ runs:
|
|||||||
INPUT_TOOL: ${{ inputs.tool }}
|
INPUT_TOOL: ${{ inputs.tool }}
|
||||||
INPUT_CHECKSUM: ${{ inputs.checksum }}
|
INPUT_CHECKSUM: ${{ inputs.checksum }}
|
||||||
INPUT_FALLBACK: ${{ inputs.fallback }}
|
INPUT_FALLBACK: ${{ inputs.fallback }}
|
||||||
|
DEFAULT_GITHUB_TOKEN: ${{ github.token }}
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
- run: bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
|
- run: bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -53,4 +54,5 @@ runs:
|
|||||||
INPUT_TOOL: ${{ inputs.tool }}
|
INPUT_TOOL: ${{ inputs.tool }}
|
||||||
INPUT_CHECKSUM: ${{ inputs.checksum }}
|
INPUT_CHECKSUM: ${{ inputs.checksum }}
|
||||||
INPUT_FALLBACK: ${{ inputs.fallback }}
|
INPUT_FALLBACK: ${{ inputs.fallback }}
|
||||||
|
DEFAULT_GITHUB_TOKEN: ${{ github.token }}
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
|
|||||||
3
main.sh
3
main.sh
@@ -826,6 +826,9 @@ if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
|
|||||||
info "install-action does not support ${unsupported_tools[*]}; fallback to cargo-binstall"
|
info "install-action does not support ${unsupported_tools[*]}; fallback to cargo-binstall"
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
install_cargo_binstall
|
install_cargo_binstall
|
||||||
|
if [[ -z "${GITHUB_TOKEN:-}" ]] && [[ -n "${DEFAULT_GITHUB_TOKEN:-}" ]]; then
|
||||||
|
export GITHUB_TOKEN="${DEFAULT_GITHUB_TOKEN}"
|
||||||
|
fi
|
||||||
# By default, cargo-binstall enforce downloads over secure transports only.
|
# By default, cargo-binstall enforce downloads over secure transports only.
|
||||||
# As a result, http will be disabled, and it will also set
|
# As a result, http will be disabled, and it will also set
|
||||||
# min tls version to be 1.2
|
# min tls version to be 1.2
|
||||||
|
|||||||
Reference in New Issue
Block a user