Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove redundant safe.directory configuration #128

Merged
merged 4 commits into from Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions README.md
Expand Up @@ -50,17 +50,6 @@ jobs:
| 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. |

## 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).
Expand Down
1 change: 0 additions & 1 deletion start.sh
Expand Up @@ -24,6 +24,5 @@ fi
cd ${INPUT_DIRECTORY}

remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
git config --local --add safe.directory ${INPUT_DIRECTORY}

git push "${remote_repo}" HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION $_TAGS;