diff options
author | j.spijker@ultimaker.com <jelle spijker> | 2022-07-12 12:45:20 +0300 |
---|---|---|
committer | jspijker <j.spijker@ultimaker.com> | 2022-07-12 12:45:20 +0300 |
commit | b56b65ab3dcde8912ba870af92f2781300a99cb0 (patch) | |
tree | 2e32c6b5dc86a6934e9d765ab519421e5b2794e5 /.github | |
parent | 6c4e85b85c6bc4b728b72e08f8850754f681c8ac (diff) |
use the job outputs
Contributes to CURA-9365
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/conan-recipe-version.yml | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/.github/workflows/conan-recipe-version.yml b/.github/workflows/conan-recipe-version.yml index 854d54522c..d12f31b26f 100644 --- a/.github/workflows/conan-recipe-version.yml +++ b/.github/workflows/conan-recipe-version.yml @@ -10,23 +10,23 @@ on: outputs: recipe_id_full: description: "The full Conan recipe id: <name>/<version>@<user>/<channel>" - value: ${{ jobs.get-conan-broadcast-data.outputs.recipe_id_full }} + value: ${{ jobs.get-semver.outputs.recipe_id_full }} recipe_id_latest: description: "The full Conan recipe aliased (latest) id: <name>/(latest)@<user>/<channel>" - value: ${{ jobs.get-conan-broadcast-data.outputs.recipe_id_latest }} + value: ${{ jobs.get-semver.outputs.recipe_id_latest }} recipe_semver_full: description: "The full semver <Major>.<Minor>.<Patch>-<PreReleaseTag>+<BuildMetaData>" - value: ${{ jobs.get-conan-broadcast-data.outputs.semver_full }} + value: ${{ jobs.get-semver.outputs.semver_full }} recipe_user: description: "The conan user" - value: ${{ jobs.get-conan-broadcast-data.outputs.user }} + value: ${{ jobs.get-semver.outputs.user }} recipe_channel: description: "The conan channel" - value: ${{ jobs.get-conan-broadcast-data.outputs.channel }} + value: ${{ jobs.get-semver.outputs.channel }} jobs: get-semver: @@ -60,6 +60,7 @@ jobs: - id: get-conan-broadcast-data name: Get Conan broadcast data run: | + import subprocess from conans import tools from conans.errors import ConanException from git import Repo @@ -125,13 +126,18 @@ jobs: actual_version = f"{latest_branch_version.major}.{latest_branch_version.minor}.{latest_branch_version.patch}-{latest_branch_version.prerelease.lower()}+{no_commits}" # %% print to output - print(f"::set-output name=name::{project_name}") - print(f"::set-output name=version::{actual_version}") - print(f"::set-output name=user::{user}") - print(f"::set-output name=channel::{channel}") - print(f"::set-output name=recipe_id_full::{project_name}/{actual_version}@{user}/{channel}") - print(f"::set-output name=recipe_id_latest::{project_name}/latest@{user}/{channel}") - print(f"::set-output name=semver_full::{actual_version}") + cmd_name = ["echo", f"'::set-output name=name::{project_name}'"] + subprocess.call(cmd_name) + cmd_version = ["echo", f"'::set-output name=version::{actual_version}'"] + subprocess.call(cmd_version) + cmd_channel = ["echo", f"'::set-output name=channel::{channel}'"] + subprocess.call(cmd_channel) + cmd_id_full= ["echo", f"'::set-output name=recipe_id_full::{project_name}/{actual_version}@{user}/{channel}'"] + subprocess.call(cmd_id_full) + cmd_id_latest = ["echo", f"'::set-output name=recipe_id_latest::{project_name}/latest@{user}/{channel}'"] + subprocess.call(cmd_id_latest) + cmd_semver_full = ["echo", f"'::set-output name=semver_full::{actual_version}'"] + subprocess.call(cmd_semver_full) print("::group::Conan Recipe Information") print(f"name = {project_name}") |