Skip to content

Fix chown perms for self-hosted runner issue #45

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 9, 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
7 changes: 4 additions & 3 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ function setup_ssh_access() {

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.
chown -R root: "$GITHUB_WORKSPACE"
# Check and update submodules if any
if [[ -f "$GITHUB_WORKSPACE/.gitmodules" ]]; then
# 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.
chown -R :root "$GITHUB_WORKSPACE"

# 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