This is to avoid having to run git config --global --add safe.directory /cloudbees/workspace explicitly within workflows after checking out a git repo.
(git requires the safe.directory to be configured explicitly when the workspace directory may be owned by a different user than the current git process which is the case when different containerized job steps are run with different UIDs.)
Also, the PR adjusts the workflow to allow testing the Action within a pull request build.
This is to avoid having to run
git config --global --add safe.directory /cloudbees/workspace
explicitly within workflows after checking out a git repo. (git requires the safe.directory to be configured explicitly when the workspace directory may be owned by a different user than the current git process which is the case when different containerized job steps are run with different UIDs.)Also, the PR adjusts the workflow to allow testing the Action within a pull request build.