mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-07-27 22:38:30 +08:00
pin setup-bun path for post steps (#1365)
Signed-off-by: kiwigitops <kiwisclubco@gmail.com>
This commit is contained in:
parent
84d317e8f9
commit
b371255139
14
action.yml
14
action.yml
@ -187,6 +187,7 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Install Bun
|
- name: Install Bun
|
||||||
|
id: setup-bun
|
||||||
if: inputs.path_to_bun_executable == ''
|
if: inputs.path_to_bun_executable == ''
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # https://github.com/oven-sh/setup-bun/releases/tag/v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # https://github.com/oven-sh/setup-bun/releases/tag/v2.2.0
|
||||||
with:
|
with:
|
||||||
@ -238,11 +239,20 @@ runs:
|
|||||||
if: ${{ inputs.allowed_non_write_users != '' }}
|
if: ${{ inputs.allowed_non_write_users != '' }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
PATH_TO_BUN_EXECUTABLE: ${{ inputs.path_to_bun_executable }}
|
||||||
|
SETUP_BUN_PATH: ${{ steps.setup-bun.outputs.bun-path }}
|
||||||
run: |
|
run: |
|
||||||
# Keep a copy of the bun binary alongside the action's own files so
|
# Keep a copy of the bun binary alongside the action's own files so
|
||||||
# post-steps use the same version that was on PATH at action start.
|
# post-steps use the same version the action installed or was given.
|
||||||
mkdir -p "$GITHUB_ACTION_PATH/bin"
|
mkdir -p "$GITHUB_ACTION_PATH/bin"
|
||||||
cp "$(command -v bun)" "$GITHUB_ACTION_PATH/bin/bun"
|
for bun_path in "$PATH_TO_BUN_EXECUTABLE" "$SETUP_BUN_PATH" "$(command -v bun || true)"; do
|
||||||
|
if [ -n "$bun_path" ] && [ -x "$bun_path" ]; then
|
||||||
|
cp "$bun_path" "$GITHUB_ACTION_PATH/bin/bun"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
test -x "$GITHUB_ACTION_PATH/bin/bun"
|
||||||
|
|
||||||
- name: Prepend system bin dirs to PATH
|
- name: Prepend system bin dirs to PATH
|
||||||
if: ${{ inputs.allowed_non_write_users != '' && runner.os != 'Windows' }}
|
if: ${{ inputs.allowed_non_write_users != '' && runner.os != 'Windows' }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user