From edea504fd3733c197b877a104c84d42c729550c9 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Tue, 3 Aug 2021 10:46:39 +0300 Subject: [PATCH] fix: Fixes for Che-Operator post release workflows (#990) Signed-off-by: Mykhailo Kuznietsov --- .github/workflows/release-che-docs.yml | 2 +- .github/workflows/release-chectl.yml | 8 ++++---- olm/prepare-community-operators-update.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-che-docs.yml b/.github/workflows/release-che-docs.yml index 8235d26ce..6d4aa928f 100644 --- a/.github/workflows/release-che-docs.yml +++ b/.github/workflows/release-che-docs.yml @@ -42,7 +42,7 @@ jobs: set -e # if not run manually, need to compute che docs version from latest released CSV if [[ "${{ github.event.inputs.version }}" == "" ]] || [[ "${{ github.event.inputs.version }}" == "7.y.z" ]]; then - chedocsVersion=$(chedocsVersion=$(grep Version version/version.go | cut -d \" -f2) + chedocsVersion=$(grep Version version/version.go | cut -d \" -f2) else chedocsVersion="${{ github.event.inputs.version }}" fi diff --git a/.github/workflows/release-chectl.yml b/.github/workflows/release-chectl.yml index 3dfdd1f6e..4ccabbe88 100644 --- a/.github/workflows/release-chectl.yml +++ b/.github/workflows/release-chectl.yml @@ -62,8 +62,8 @@ jobs: this_repo=$1 this_action_name=$2 this_workflow_id=$3 - this_var=$4 - this_val=$5 + this_workflow_ref=$4 + this_params=$5 # can compute using GH API # workflow_id=$(curl -sSL https://api.github.com/repos/${this_repo}/actions/workflows -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" | jq --arg search_field "${this_action_name}" '.workflows[] | select(.name == $search_field).id'); # echo "workflow_id = $workflow_id" @@ -81,9 +81,9 @@ jobs: inputsJson=$(echo "${inputsJson}" | jq ". + {\"${key}\": \"${value}\"}") done - curl -sSL https://api.github.com/repos/${this_repo}/actions/workflows/${workflow_id}/dispatches -X POST -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" -d "{\"ref\":\"${workflow_ref}\",\"inputs\": ${inputsJson} }" + curl -sSL https://api.github.com/repos/${this_repo}/actions/workflows/${workflow_id}/dispatches -X POST -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" -d "{\"ref\":\"${this_workflow_ref}\",\"inputs\": ${inputsJson} }" echo "[INFO] Invoked '${this_action_name}' action ($workflow_id) - see https://github.com/${this_repo}/actions?query=workflow%3A%22${this_action_name// /+}%22" } # invoke action from chectl repo - invokeAction che-incubator/chectl "Release - create pull request for upcoming release" "4267607" "version=${chectlVersion},dwoVersion=${dwoVersion}" + invokeAction che-incubator/chectl "Release - create pull request for upcoming release" "4008310" "version=${chectlVersion},dwoVersion=${dwoVersion}" diff --git a/olm/prepare-community-operators-update.sh b/olm/prepare-community-operators-update.sh index 4a228b040..9b25f571f 100755 --- a/olm/prepare-community-operators-update.sh +++ b/olm/prepare-community-operators-update.sh @@ -14,10 +14,10 @@ set -e CURRENT_DIR=$(pwd) SCRIPT=$(readlink -f "${BASH_SOURCE[0]}") -BASE_DIR=$(cd "$(dirname "$0")"; pwd) +BASE_DIR=$(dirname "$(dirname "$SCRIPT")") PLATFORMS="kubernetes,openshift" STABLE_CHANNELS=("stable-all-namespaces" "stable") -source "${BASE_DIR}/check-yq.sh" +source "${BASE_DIR}/olm/check-yq.sh" base_branch="main" GITHUB_USER="che-bot"