5
0
Fork 0
mirror of https://github.com/wagoid/commitlint-github-action.git synced 2025-11-07 16:06:56 +00:00

Merge pull request #411 from wagoid/ci/fix-unsafe-repository-issue

ci: set workspace directory as safe after checkout
This commit is contained in:
Wagner Santos 2022-05-07 06:37:44 -03:00 committed by GitHub
commit 0f5f7da0b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -14,7 +14,7 @@ jobs:
commitlint: commitlint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4 - uses: wagoid/commitlint-github-action@v4
@ -134,7 +134,7 @@ jobs:
commitlint: commitlint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2

View file

@ -8,4 +8,8 @@ else
export NODE_PATH=$NODE_PATH:/node_modules export NODE_PATH=$NODE_PATH:/node_modules
fi fi
# Since actions/checkout can be setup with a different user ID, we need to set the workspace as safe inside this action
# Info about the vunlerability: https://github.blog/2022-04-12-git-security-vulnerability-announced/
git config --global --add safe.directory "$GITHUB_WORKSPACE"
node /run.js node /run.js