diff --git a/github_pr_to_internal_pr/Dockerfile b/github_pr_to_internal_pr/Dockerfile index 422d76a..9ac679b 100644 --- a/github_pr_to_internal_pr/Dockerfile +++ b/github_pr_to_internal_pr/Dockerfile @@ -12,6 +12,18 @@ RUN apt-get update && \ pip3 install --upgrade pip && \ pip3 install -r /tmp/requirements.txt +# Changing the ownership of the repository after checking out +# Error: fatal: detected dubious ownership in repository at '/github/workspace' +# To add an exception for this directory, call: +# git config --global --add safe.directory /github/workspace +# Reason: Recent versions of git require the .git folder to be owned +# by the same user (see https://github.blog/2022-04-12-git-security-vulnerability-announced/). +# Related +# - https://github.com/actions/runner/issues/2033 +# - https://github.com/actions/checkout/issues/1048 +# - https://github.com/actions/runner-images/issues/6775 +RUN chown -R $(id -u):$(id -g) $PWD + COPY github_pr_to_internal_pr.py / ENTRYPOINT ["/usr/bin/python3", "/github_pr_to_internal_pr.py"]