Fix substitution. Works with any strings (not as sed)

Less portable but tested with Busybox shell used in this image
This commit is contained in:
Carles Pina i Estany 2020-11-04 16:45:08 +00:00
parent 79e1b1b20b
commit c26a144ee1

View File

@ -39,7 +39,7 @@ ls -la
echo "Adding git commit"
ORIGIN_COMMIT="https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
COMMIT_MESSAGE=$(echo "$COMMIT_MESSAGE" | sed "s/ORIGIN_COMMIT/$ORIGIN_COMMIT/g")
COMMIT_MESSAGE="${COMMIT_MESSAGE/ORIGIN_COMMIT/$ORIGIN_COMMIT}"
git add .
git status