Skip to content

Commit 34a7c81

Browse files
committed
ci: ensure fnm is installed in build_reusable
1 parent 0bbc032 commit 34a7c81

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/build_reusable.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,25 @@ jobs:
105105
input_step_key: ${{ steps.var.outputs.input_step_key }}
106106

107107
steps:
108+
- name: Check if fnm is installed
109+
id: check-fnm
110+
run: |
111+
if [ -x "$(command -v fnm)" ]; then
112+
echo "fnm found."
113+
echo "found=true" >> $GITHUB_OUTPUT
114+
else
115+
echo "fnm not found."
116+
echo "found=false" >> $GITHUB_OUTPUT
117+
fi
118+
119+
- name: Install fnm
120+
if: steps.check-fnm.outputs.found != 'true'
121+
- run: |
122+
curl -fsSL https://fnm.vercel.app/install | bash
123+
export PATH="/home/runner/.local/share/fnm:$PATH"
124+
echo "/home/runner/.local/share/fnm" >> $GITHUB_PATH
125+
which fnm
126+
108127
- name: Normalize input step names into path key
109128
uses: actions/github-script@v7
110129
id: var

0 commit comments

Comments
 (0)