Skip to content

Commit

Permalink
Merge pull request #45 from rtCamp/fix/chown-perms
Browse files Browse the repository at this point in the history
Fix chown perms for self-hosted runner issue
  • Loading branch information
mrrobot47 authored Jul 9, 2024
2 parents 6fb8671 + 62bdac7 commit cf0997a
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit cf0997a

Please sign in to comment.