From 46a79a48da30144c7816884fe61f26526ff44d4a Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Fri, 18 Mar 2022 13:47:59 +0100 Subject: [PATCH] workflows: Fix Gitlab CI trigger + revert debug Previous implementation added single quotes to the git command which made it not trigger the Gitlab CI at all. Changing it to clasic bash if condition. --- .github/workflows/trigger-gitlab.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger-gitlab.yml b/.github/workflows/trigger-gitlab.yml index e05c6bce8..78b37c6f2 100644 --- a/.github/workflows/trigger-gitlab.yml +++ b/.github/workflows/trigger-gitlab.yml @@ -76,7 +76,6 @@ jobs: - name: Push to gitlab run: | - set -x mkdir -p ~/.ssh echo "${SCHUTZBOT_SSH_KEY}" > ~/.ssh/id_rsa chmod 400 ~/.ssh/id_rsa @@ -84,5 +83,8 @@ jobs: ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts git remote add ci git@gitlab.com:osbuild/ci/osbuild-composer.git SKIP_CI=$(cat SKIP_CI.txt) - [[ "${SKIP_CI}" == true ]] && PUSH_OPTION='-o ci.variable="SKIP_CI=true"' || PUSH_OPTION="" - git push -f ${PUSH_OPTION} ci + if [[ "${SKIP_CI}" == true ]];then + git push -f -o ci.variable="SKIP_CI=true" ci + else + git push -f ci + fi