mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2025-09-05 08:05:47 -06:00
Add the specific directory to be safe
This commit is contained in:
parent
dc60927594
commit
e28934e9fd
@ -31,11 +31,6 @@ CLONE_DIR=$(mktemp -d)
|
|||||||
echo "[+] Git version"
|
echo "[+] Git version"
|
||||||
git --version
|
git --version
|
||||||
|
|
||||||
echo "[+] Add everything is safe"
|
|
||||||
# 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
|
|
||||||
# TODO: review before releasing it as a version
|
|
||||||
git config --global --add safe.directory /
|
|
||||||
|
|
||||||
echo "[+] Cloning destination git repository $DESTINATION_REPOSITORY_NAME"
|
echo "[+] Cloning destination git repository $DESTINATION_REPOSITORY_NAME"
|
||||||
# Setup git
|
# Setup git
|
||||||
git config --global user.email "$USER_EMAIL"
|
git config --global user.email "$USER_EMAIL"
|
||||||
@ -105,6 +100,11 @@ ORIGIN_COMMIT="https://$GITHUB_SERVER/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
|||||||
COMMIT_MESSAGE="${COMMIT_MESSAGE/ORIGIN_COMMIT/$ORIGIN_COMMIT}"
|
COMMIT_MESSAGE="${COMMIT_MESSAGE/ORIGIN_COMMIT/$ORIGIN_COMMIT}"
|
||||||
COMMIT_MESSAGE="${COMMIT_MESSAGE/\$GITHUB_REF/$GITHUB_REF}"
|
COMMIT_MESSAGE="${COMMIT_MESSAGE/\$GITHUB_REF/$GITHUB_REF}"
|
||||||
|
|
||||||
|
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
|
||||||
|
# TODO: review before releasing it as a version
|
||||||
|
git config --global --add safe.directory "$CLONE_DIR"
|
||||||
|
|
||||||
echo "[+] Adding git commit"
|
echo "[+] Adding git commit"
|
||||||
git add .
|
git add .
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user