fixalpinesh/action.yml
Lain Iwakura 65365c89f1
fix shell
2025-06-20 22:30:28 +03:00

54 lines
1.3 KiB
YAML

name: 'Fix Shell Alpine'
description: 'Fix shell issues on Alpine runners by installing bash and nodejs'
branding:
icon: 'terminal'
color: 'blue'
inputs:
install-bash:
description: 'Install bash'
required: false
default: 'true'
install-nodejs:
description: 'Install nodejs'
required: false
default: 'true'
extra-packages:
description: 'Additional packages to install'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Update package index
if: runner.os == 'Linux'
shell: sh
run: |
if command -v apk >/dev/null 2>&1; then
apk update
fi
- name: Install bash
if: inputs.install-bash == 'true' && runner.os == 'Linux'
shell: sh
run: |
if command -v apk >/dev/null 2>&1; then
apk add --no-cache bash
fi
- name: Install nodejs
if: inputs.install-nodejs == 'true' && runner.os == 'Linux'
shell: sh
run: |
if command -v apk >/dev/null 2>&1; then
apk add --no-cache nodejs npm
fi
- name: Install extra packages
if: inputs.extra-packages != '' && runner.os == 'Linux'
shell: sh
run: |
if command -v apk >/dev/null 2>&1; then
apk add --no-cache ${{ inputs.extra-packages }}
fi