From 622a217c35629bf22d74a3b05ca7ff6936faee39 Mon Sep 17 00:00:00 2001 From: minkimcello Date: Wed, 20 Apr 2022 12:23:37 -0400 Subject: [PATCH] Configure workspace as a safe directory --- publish-pr-preview/README.md | 6 ++++-- publish-pr-preview/entrypoint.sh | 1 + synchronize-npm-tags/README.md | 4 ++-- synchronize-with-npm/README.md | 6 ++++-- synchronize-with-npm/entrypoint.sh | 1 + 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/publish-pr-preview/README.md b/publish-pr-preview/README.md index b32336fe..efb9c06f 100644 --- a/publish-pr-preview/README.md +++ b/publish-pr-preview/README.md @@ -28,9 +28,11 @@ jobs: name: Job Name runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Publish PR Preview - uses: thefrontside/actions/publish-pr-preview@master + uses: thefrontside/actions/publish-pr-preview@v1 with: BEFORE_ALL: npm run prepack-after-install NPM_PUBLISH: npm run my-script diff --git a/publish-pr-preview/entrypoint.sh b/publish-pr-preview/entrypoint.sh index 9b637967..4dd88194 100644 --- a/publish-pr-preview/entrypoint.sh +++ b/publish-pr-preview/entrypoint.sh @@ -176,6 +176,7 @@ function package_json_finder(){ done; } + git config --global --add safe.directory /github/workspace git checkout $GITHUB_BASE_REF git checkout $GITHUB_HEAD_REF diff --git a/synchronize-npm-tags/README.md b/synchronize-npm-tags/README.md index 142a9724..f5b7abc8 100644 --- a/synchronize-npm-tags/README.md +++ b/synchronize-npm-tags/README.md @@ -14,8 +14,8 @@ jobs: name: Job Name runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: thefrontside/actions/synchronize-npm-tags@master + - uses: actions/checkout@v3 + - uses: thefrontside/actions/synchronize-npm-tags@v1 with: preserve: dev beta alpha env: diff --git a/synchronize-with-npm/README.md b/synchronize-with-npm/README.md index 77a7aebd..b8b7bd1c 100644 --- a/synchronize-with-npm/README.md +++ b/synchronize-with-npm/README.md @@ -19,9 +19,11 @@ jobs: name: Job Name runs-on: ubuntu-16.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Syncrhonize with NPM - uses: thefrontside/actions/synchronize-with-npm@master + uses: thefrontside/actions/synchronize-with-npm@v1 with: BEFORE_ALL: npm run prepack-after-install NPM_PUBLISH: npm run my-script diff --git a/synchronize-with-npm/entrypoint.sh b/synchronize-with-npm/entrypoint.sh index 7d4e19ac..a7859df9 100644 --- a/synchronize-with-npm/entrypoint.sh +++ b/synchronize-with-npm/entrypoint.sh @@ -8,6 +8,7 @@ BLUE='\033[1;34m' NC='\033[0m' function git_setup(){ + git config --global --add safe.directory /github/workspace git remote set-url origin https://x-oauth-basic:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git git fetch origin +refs/heads/*:refs/heads/*