mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 08:06:54 +00:00
`actions/checkout` already fixed the issue on their side in [v3.0.1](https://github.com/actions/checkout/releases/tag/v3.0.1). But since this is a container action, it can be run with another uid than the one from `actions/checkout` and therefore we need to add the `safe.directory` config again. Another way of fixing this would be to make this action run with the same uid as the github runner, but as mentioned [here](https://github.com/actions/checkout/issues/760#issuecomment-1098135955) we're not sure whether the `1000` uid of the runner is reliable. The different `uid` issue seems more like a Github Actions ecosystem problem, maybe they'll take care of it later.
15 lines
430 B
Bash
Executable file
15 lines
430 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ -z "$NODE_PATH" ]; then
|
|
export NODE_PATH=/node_modules
|
|
else
|
|
export NODE_PATH=$NODE_PATH:/node_modules
|
|
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
|