Skip to content

Add individual submodule path as safe #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ function maybe_install_submodules() {
# Change directory ownership to container user due to issue https://github.com/actions/checkout/issues/760
# This will be changed to www-data or similar on deployment by deployer.
git config --global --add safe.directory "$GITHUB_WORKSPACE"
submodule_paths=$(grep path .gitmodules | awk '{print $3}')
for path in $submodule_paths; do
git config --global --add safe.directory "$GITHUB_WORKSPACE/$path"
done

# add github's public key
curl -sL https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >>/etc/ssh/known_hosts
Expand Down