File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed
Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -17,29 +17,24 @@ branding:
1717runs :
1818 using : " composite"
1919 steps :
20- - uses : actions/setup-python@v6
2120 - id : set-vars
22- shell : python
21+ uses : actions/github-script@v8
2322 env :
2423 COMMITIZEN_VERSION : ${{ inputs.version }}
2524 CACHE : ${{ inputs.cache }}
26- run : |
27- import os
25+ with :
26+ script : |
27+ // Set commitizen version
28+ const commitizenVersion = process.env.COMMITIZEN_VERSION || '';
29+ const setCommitizenVersion = commitizenVersion === 'latest' ? '' : `==${commitizenVersion}`;
2830
29- # Set commitizen version
30- commitizen_version = os.environ.get("COMMITIZEN_VERSION", "").strip()
31- if commitizen_version == "latest":
32- set_commitizen_version = ""
33- else:
34- set_commitizen_version = f"=={commitizen_version}"
35-
36- # Write outputs
37- with open(os.environ["GITHUB_OUTPUT"], "a") as fh:
38- fh.write(f"COMMITIZEN_VERSION={set_commitizen_version}\n")
31+ // Write outputs
32+ core.setOutput('commitizen-version', setCommitizenVersion);
33+ - uses : actions/setup-python@v6
3934 - name : Install commitizen
4035 shell : bash
4136 env :
42- COMMITIZEN_VERSION : ${{ steps.set-vars.outputs.COMMITIZEN_VERSION }}
37+ COMMITIZEN_VERSION : ${{ steps.set-vars.outputs.commitizen-version }}
4338 EXTRA_REQUIREMENTS : ${{ inputs.extra_requirements }}
4439 run : |
4540 pip install -U commitizen${COMMITIZEN_VERSION} ${EXTRA_REQUIREMENTS}
You can’t perform that action at this time.
0 commit comments