diff --git a/README.md b/README.md index 5fbd420..e919f16 100644 --- a/README.md +++ b/README.md @@ -99,17 +99,6 @@ jobs: | directory | string | '.' | Directory to change to before pushing. | | repository | string | '' | Repository name.
Default or empty repository name represents
current github repository.
If you want to push to other repository,
you should make a [personal access token](https://github.com/settings/tokens)
and use it as the `github_token` input. | -## Troubeshooting - -Please be aware, if your job fails and the corresponding output log looks like the following error, update your used verson of the action to `ad-m/github-push-action@master`: -```log -Push to branch *************** -fatal: unsafe repository ('/github/workspace' is owned by someone else) -To add an exception for this directory, call: - - git config --global --add safe.directory /github/workspace -``` - ## License The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE). diff --git a/start.sh b/start.sh index 1bbc320..cd6c1d9 100755 --- a/start.sh +++ b/start.sh @@ -40,11 +40,8 @@ else remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git" fi -git config --local --add safe.directory ${INPUT_DIRECTORY} - if ${INPUT_FORCE_WITH_LEASE}; then git push --follow-tags $_FORCE_OPTION $_TAGS; else git push "${remote_repo}" HEAD:${INPUT_BRANCH} --verbose --follow-tags $_FORCE_OPTION $_TAGS; fi -