Skip to content

Commit

Permalink
fix: add workspace to git safe directories to avoid dubious ownership…
Browse files Browse the repository at this point in the history
… error (#26)
  • Loading branch information
mschoettle committed Dec 22, 2022
1 parent a77c4d0 commit b1a0cea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:buster-slim
FROM debian:bullseye-slim

# Github labels
LABEL "com.github.actions.name"="dokku-github-action"
Expand Down
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ if [ -n "$APP_CONFIG" ]; then
$GIT_SSH_COMMAND dokku@$HOST config:set --no-restart $PROJECT $APP_CONFIG > /dev/null 2>&1
fi

# prevent dubious ownership error due to ownership mismatch in parent directories
# see: https://github.com/vitalyliber/dokku-github-action/issues/25
echo "Adding repository directory to the git global config as a safe directory"
git config --global --add safe.directory /github/workspace

echo "The deploy is starting"

GIT_SSH_COMMAND="$GIT_SSH_COMMAND" $GIT_COMMAND

0 comments on commit b1a0cea

Please sign in to comment.