Changed more set-output lines.

This commit is contained in:
Patrick Lehmann
2022-11-03 07:00:05 +01:00
parent e40d45fcaa
commit a64e575bdd
3 changed files with 19 additions and 13 deletions

View File

@@ -115,8 +115,13 @@ jobs:
else:
print(f"File '{coverageRCFile}' not found.")
print(f"::set-output name=coverage_report_html_directory::{htmlDirectory}")
print(f"::set-output name=coverage_report_xml::{xmlFile}")
# Write jobs to special file
github_output = Path(getenv("GITHUB_OUTPUT"))
print(f"GITHUB_OUTPUT: {github_output}")
with github_output.open("a+") as f:
f.write(f"coverage_report_html_directory={htmlDirectory}\n")
f.write(f"coverage_report_xml={xmlFile}\n")
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}")
- name: Collect coverage

View File

@@ -58,12 +58,12 @@ on:
python_version:
description: "Default Python version for other jobs."
value: ${{ jobs.Parameters.outputs.python_version }}
artifact_names:
description: "Pre-defined artifact names for other jobs."
value: ${{ jobs.Parameters.outputs.artifact_names }}
python_jobs:
description: "List of Python versions (and system combinations) to be used in the matrix of other jobs."
value: ${{ jobs.Parameters.outputs.python_jobs }}
artifact_names:
description: "Pre-defined artifact names for other jobs."
value: ${{ jobs.Parameters.outputs.artifact_names }}
params:
description: "Parameters to be used in other jobs."
value: ${{ jobs.Parameters.outputs.params }}
@@ -74,9 +74,9 @@ jobs:
runs-on: ubuntu-latest
outputs:
python_version: ${{ steps.params.outputs.python_version }}
python_jobs: ${{ steps.params.outputs.python_jobs }}
artifact_names: ${{ steps.params.outputs.artifact_names }}
params: ${{ steps.params.outputs.params }}
python_jobs: ${{ steps.params.outputs.python_jobs }}
steps:
- name: Generate 'params' and 'python_jobs'
@@ -247,13 +247,14 @@ jobs:
print(f"GITHUB_OUTPUT: {github_output}")
with github_output.open("a+") as f:
f.write(f"python_version={python_version}\n")
f.write(f"python_jobs={jobs!s}\n")
f.write(f"artifact_names={params['artifacts']!s}\n")
f.write(f"params={params!s}\n")
f.write(f"python_jobs={jobs!s}\n")
- name: Verify out parameters
id: verify
run: |
echo pyver ${{ steps.params.outputs.python_version }}
echo $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
echo "python_version: ${{ steps.params.outputs.python_version }}"
echo "python_jobs: ${{ steps.params.outputs.python_version }}"
echo "artifact_names: ${{ steps.params.outputs.artifact_names }}"
echo "params: ${{ steps.params.outputs.params }}"

View File

@@ -39,9 +39,9 @@ jobs:
RELEASE_VERSION=${GIT_TAG#v}
RELEASE_DATETIME="$(date --utc '+%d.%m.%Y - %H:%M:%S')"
# write to step outputs
echo ::set-output name=gitTag::${GIT_TAG}
echo ::set-output name=version::${RELEASE_VERSION}
echo ::set-output name=datetime::${RELEASE_DATETIME}
echo "gitTag=${GIT_TAG}" >> $GITHUB_OUTPUT
echo "version=${RELEASE_VERSION}" >> $GITHUB_OUTPUT
echo "datetime=${RELEASE_DATETIME}" >> $GITHUB_OUTPUT
- name: 📑 Create Release Page
id: createReleasePage