From fcea09907c44d7a7a3331c9c04080d55d87c95fe Mon Sep 17 00:00:00 2001 From: Pascal Zimmermann Date: Mon, 22 Jan 2024 09:19:38 +0100 Subject: [PATCH] fix: Update the documentation (#160) * fix: Update the documentation and remove the unsafe directory functionality * docs: Adjust the used checkout version Co-authored-by: Tonye Jack --------- Co-authored-by: Tonye Jack --- README.md | 11 +---------- start.sh | 2 -- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index e7d4ca3..732f97e 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. @@ -287,15 +287,6 @@ jobs: ## Troubleshooting -Please be aware, if your job fails and the corresponding output log looks like the following error, update your used version of the action to `ad-m/github-push-action@master` and check the used version of the `checkout` action (v2 is required): -```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 -``` - If you see the following error inside the output of the job, and you want to update an existing Tag: ```log To https://github.com/Test/test_repository diff --git a/start.sh b/start.sh index d943d8b..c654bf6 100644 --- a/start.sh +++ b/start.sh @@ -51,8 +51,6 @@ else remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//oauth2:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git" fi -git config --local --add safe.directory ${INPUT_DIRECTORY} - if ! ${INPUT_FORCE_WITH_LEASE}; then ADDITIONAL_PARAMETERS="${remote_repo} HEAD:${INPUT_BRANCH}" fi