Merge pull request #128 from jackton1/patch-4
chore: remove redundant safe.directory configuration
This commit is contained in:
commit
c9ef0a92e1
11
README.md
11
README.md
@ -99,17 +99,6 @@ jobs:
|
|||||||
| directory | string | '.' | Directory to change to before pushing. |
|
| directory | string | '.' | Directory to change to before pushing. |
|
||||||
| repository | string | '' | Repository name. <br /> Default or empty repository name represents <br /> current github repository. <br /> If you want to push to other repository, <br /> you should make a [personal access token](https://github.com/settings/tokens) <br /> and use it as the `github_token` input. |
|
| repository | string | '' | Repository name. <br /> Default or empty repository name represents <br /> current github repository. <br /> If you want to push to other repository, <br /> you should make a [personal access token](https://github.com/settings/tokens) <br /> 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
|
## License
|
||||||
|
|
||||||
The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE).
|
The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE).
|
||||||
|
3
start.sh
3
start.sh
@ -40,11 +40,8 @@ else
|
|||||||
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
|
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git config --local --add safe.directory ${INPUT_DIRECTORY}
|
|
||||||
|
|
||||||
if ${INPUT_FORCE_WITH_LEASE}; then
|
if ${INPUT_FORCE_WITH_LEASE}; then
|
||||||
git push --follow-tags $_FORCE_OPTION $_TAGS;
|
git push --follow-tags $_FORCE_OPTION $_TAGS;
|
||||||
else
|
else
|
||||||
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --verbose --follow-tags $_FORCE_OPTION $_TAGS;
|
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --verbose --follow-tags $_FORCE_OPTION $_TAGS;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user