From 18caea3525b8d3318c2238d659dc541dfe9c4a23 Mon Sep 17 00:00:00 2001 From: Carles Pina i Estany Date: Fri, 16 Sep 2022 00:11:21 +0100 Subject: [PATCH] Fix variable substitution --- entrypoint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 83a61f1..8f71ee3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,6 @@ #!/bin/sh -l +set -x set -e # if a command fails it stops the execution set -u # script fails if trying to access to an undefined variable @@ -126,8 +127,10 @@ echo "[+] Files that will be pushed" ls -la ORIGIN_COMMIT="https://$GITHUB_SERVER/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" -COMMIT_MESSAGE="${COMMIT_MESSAGE/ORIGIN_COMMIT/$ORIGIN_COMMIT}" -COMMIT_MESSAGE="${COMMIT_MESSAGE/\$GITHUB_REF/$GITHUB_REF}" +#COMMIT_MESSAGE="${COMMIT_MESSAGE/ORIGIN_COMMIT/$ORIGIN_COMMIT}" +#COMMIT_MESSAGE="${COMMIT_MESSAGE/\$GITHUB_REF/$GITHUB_REF}" + +COMMIT_MESSAGE="Update from $ORIGIN_COMMIT" echo "[+] Set directory is safe ($CLONE_DIR)" # Related to https://github.com/cpina/github-action-push-to-another-repository/issues/64 and https://github.com/cpina/github-action-push-to-another-repository/issues/64