Skip to content

Commit ebe8834

Browse files
fix: install python when it doesn't exist
1 parent e439e72 commit ebe8834

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ outputs:
1818
runs:
1919
using: composite
2020
steps:
21+
- id: check-python
22+
shell: bash
23+
run: | # shell
24+
if command -v python3 >/dev/null 2>&1 || command -v python >/dev/null 2>&1; then
25+
echo "installed=true" >> "$GITHUB_OUTPUT"
26+
else
27+
echo "installed=false" >> "$GITHUB_OUTPUT"
28+
fi
29+
30+
- if: steps.check-python.outputs.installed == 'false'
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.x'
34+
2135
- id: parser
2236
shell: python
2337
run: | # python

0 commit comments

Comments
 (0)