From a64e575bdd5e5c85a20f4f1a18532421896cf9e5 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Thu, 3 Nov 2022 07:00:05 +0100 Subject: [PATCH] Changed more set-output lines. --- .github/workflows/CoverageCollection.yml | 9 +++++++-- .github/workflows/Parameters.yml | 17 +++++++++-------- .github/workflows/Release.yml | 6 +++--- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index 4a87cb9..49b9cd5 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -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 diff --git a/.github/workflows/Parameters.yml b/.github/workflows/Parameters.yml index c7767f9..9bda071 100644 --- a/.github/workflows/Parameters.yml +++ b/.github/workflows/Parameters.yml @@ -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 }}" diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index cae3b0b..862b048 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -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