mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 15:10:27 +00:00
Improve platform support
This commit is contained in:
23
action.yml
23
action.yml
@@ -21,8 +21,27 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- run: bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
|
||||
shell: bash
|
||||
- run: |
|
||||
set -eu
|
||||
if ! command -v bash >/dev/null; then
|
||||
if grep -Eq '^ID=alpine' /etc/os-release; then
|
||||
printf '::group::Install packages required for checkout-action (bash)\n'
|
||||
# NB: sync with apk_install in main.sh
|
||||
if command -v sudo >/dev/null; then
|
||||
sudo apk --no-cache add bash
|
||||
elif command -v doas >/dev/null; then
|
||||
doas apk --no-cache add bash
|
||||
else
|
||||
apk --no-cache add bash
|
||||
fi
|
||||
printf '::endgroup::\n'
|
||||
else
|
||||
printf '::error::checkout-action requires bash\n'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
|
||||
shell: sh
|
||||
env:
|
||||
INPUT_TOOL: ${{ inputs.tool }}
|
||||
INPUT_CHECKSUM: ${{ inputs.checksum }}
|
||||
|
||||
Reference in New Issue
Block a user