Skip to content

Commit f32f353

Browse files
committed
Use actual bash scripting syntax
When the 'if' condition doesn't match, the GitHub action workflow stops and the pipeline fails, use proper bash syntax to fix it. Also update the setup-python action to the latest version.
1 parent d8f781e commit f32f353

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ runs:
7070
using: "composite"
7171
steps:
7272

73-
- uses: "actions/setup-python@v2"
73+
- uses: "actions/setup-python@v4"
7474

7575
- name: Update Package Versions
7676
shell: bash
@@ -82,7 +82,10 @@ runs:
8282

8383
- name: Update Python Versions
8484
shell: bash
85-
run: "[[ \"${{inputs.update_python}}\" == \"true\" ]] && sed -i 's/python_versions:.*/python_versions: [\"3.8\", \"3.9\", \"3.10\", \"3.11\"] /' \"${{ inputs.action_path }}\""
85+
run: |
86+
if [ "${{inputs.update_python}}" == "true" ]; \
87+
then sed -i 's/python_versions:.*/python_versions: [3.8, 3.9, 3.10, 3.11] /' "${{ inputs.action_path }}"; \
88+
else echo "Skipping python version update"; fi
8689
8790
- name: "Install Jinja2"
8891
shell: bash

0 commit comments

Comments
 (0)