File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,26 @@ runs:
130
130
PR_REF : ${{ github.event.pull_request.head.ref }}
131
131
PR_REPO : ${{ github.event.pull_request.head.repo.full_name }}
132
132
PR_REPO_ID : ${{ github.event.pull_request.base.repo.id }}
133
+ - name : Discover pre-installed Python
134
+ id : pre-installed-python
135
+ run : |
136
+ # 🔎 Discover pre-installed Python
137
+ echo "python-path=$(command -v python3 || :)" | tee -a "${GITHUB_OUTPUT}"
138
+ shell : bash
139
+ - name : Install Python 3
140
+ if : steps.pre-installed-python.outputs.python-path == ''
141
+ id : new-python
142
+ uses : actions/setup-python@v5
143
+ with :
144
+ python-version : 3.x
133
145
- name : Create Docker container action
134
146
run : |
135
147
# Create Docker container action
136
- python ${{ github.action_path }}/create-docker-action.py
148
+ ${{
149
+ steps.pre-installed-python.outputs.python-path == ''
150
+ && steps.new-python.outputs.python-path
151
+ || steps.pre-installed-python.outputs.python-path
152
+ }} '${{ github.action_path }}/create-docker-action.py'
137
153
env :
138
154
REF : ${{ steps.set-repo-and-ref.outputs.ref }}
139
155
REPO : ${{ steps.set-repo-and-ref.outputs.repo }}
You can’t perform that action at this time.
0 commit comments