From ee72e86a9691a43fcbaea25a2f87783b0fbe983a Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 2 Jun 2021 17:18:23 +0300 Subject: [PATCH] ci: Use semantic PRs name in release workflows (#852) * ci: Use semantic PRs name in release workflows Signed-off-by: Mykhailo Kuznietsov * fixup! ci: Use semantic PRs name in release workflows --- .github/workflows/release-chectl.yml | 2 +- make-release.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-chectl.yml b/.github/workflows/release-chectl.yml index a96fd3049..3dfdd1f6e 100644 --- a/.github/workflows/release-chectl.yml +++ b/.github/workflows/release-chectl.yml @@ -81,7 +81,7 @@ 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 ${this_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\":\"${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" } diff --git a/make-release.sh b/make-release.sh index 7c6021eec..23974c64f 100755 --- a/make-release.sh +++ b/make-release.sh @@ -160,7 +160,7 @@ releaseOperatorCode() { echo "[INFO] releaseOperatorCode :: Commit changes" if git status --porcelain; then git add -A || true # add new generated CSV files in olm/ folder - git commit -am "Update defaults tags to "$RELEASE --signoff + git commit -am "ci: Update defaults tags to "$RELEASE --signoff fi echo "[INFO] releaseOperatorCode :: Login to quay.io..." docker login quay.io -u "${QUAY_ECLIPSE_CHE_USERNAME}" -p "${QUAY_ECLIPSE_CHE_PASSWORD}" @@ -215,7 +215,7 @@ updateVersionFile() { # change version/version.go file sed -i version/version.go -r -e 's#(Version = ")([0-9.]+)(")#\1'"${RELEASE}"'\3#g' git add version/version.go - git commit -m "Update VERSION to $RELEASE" --signoff + git commit -m "ci: Update VERSION to $RELEASE" --signoff } releaseOlmFiles() { @@ -238,7 +238,7 @@ releaseOlmFiles() { echo "[INFO] releaseOlmFiles :: Commit changes" if git status --porcelain; then git add -A || true # add new generated CSV files in olm/ folder - git commit -am "Release OLM files to "$RELEASE --signoff + git commit -am "ci: Release OLM files to "$RELEASE --signoff fi } @@ -266,7 +266,7 @@ pushGitChanges() { createPRToXBranch() { echo "[INFO] createPRToXBranch :: Create pull request into ${BRANCH} branch" if [[ $FORCE_UPDATE == "--force" ]]; then set +e; fi # don't fail if PR already exists (just force push commits into it) - hub pull-request $FORCE_UPDATE --base ${BRANCH} --head ${RELEASE_BRANCH} -m "Release version ${RELEASE}" + hub pull-request $FORCE_UPDATE --base ${BRANCH} --head ${RELEASE_BRANCH} -m "ci: Release version ${RELEASE}" set -e } @@ -278,11 +278,11 @@ createPRToMainBranch() { git diff refs/heads/${BRANCH}...refs/heads/${RELEASE_BRANCH} ':(exclude)deploy/operator.yaml' | git apply -3 if git status --porcelain; then git add -A || true # add new generated CSV files in olm/ folder - git commit -am "Copy "$RELEASE" csv to main" --signoff + git commit -am "ci: Copy "$RELEASE" csv to main" --signoff fi git push origin $tmpBranch -f if [[ $FORCE_UPDATE == "--force" ]]; then set +e; fi # don't fail if PR already exists (just force push commits into it) - hub pull-request $FORCE_UPDATE --base main --head ${tmpBranch} -m "Copy "$RELEASE" csv to main" + hub pull-request $FORCE_UPDATE --base main --head ${tmpBranch} -m "ci: Copy "$RELEASE" csv to main" set -e }