diff --git a/.github/sync-to-mirrors.sh b/.github/sync-to-mirrors.sh index 311a6fb3..77252e0c 100755 --- a/.github/sync-to-mirrors.sh +++ b/.github/sync-to-mirrors.sh @@ -99,7 +99,8 @@ while read -r PLUGIN_NAME; do if [[ -n "$FORCE_COMMIT" || -n "$(git status --porcelain)" ]]; then echo "Committing to $PLUGIN_NAME" - if git commit $FORCE_COMMIT --author="${COMMIT_AUTHOR}" -m "${COMMIT_MESSAGE} \n\nCo-authored-by: ${COMMIT_ACTOR}" && + GIT_CLI_COMMIT_MESSAGE=$( printf "%s \n\nCo-authored-by: %s" "$COMMIT_MESSAGE" "$COMMIT_ACTOR" ) + if git commit $FORCE_COMMIT --author="${COMMIT_AUTHOR}" -m "${GIT_CLI_COMMIT_MESSAGE}" && { [[ -z "$CI" ]] || git push origin "$BRANCH"; } # Only do the actual push from the GitHub Action then # echo "$BUILD_BASE/changes.diff"