Skip to content

Commit

Permalink
Merge pull request #128 from jackton1/patch-4
Browse files Browse the repository at this point in the history
chore: remove redundant safe.directory configuration
  • Loading branch information
ZPascal committed Oct 3, 2022
2 parents 9a46ba8 + 7e6f17c commit c9ef0a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
11 changes: 0 additions & 11 deletions README.md
Expand Up @@ -99,17 +99,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
3 changes: 0 additions & 3 deletions start.sh
Expand Up @@ -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

0 comments on commit c9ef0a9

Please sign in to comment.