Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

sync_approved_pr: Fix dubious ownership in repository issue #35

Merged
merged 1 commit into from
Feb 3, 2023
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
12 changes: 12 additions & 0 deletions github_pr_to_internal_pr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
laukik-hase marked this conversation as resolved.
Show resolved Hide resolved

COPY github_pr_to_internal_pr.py /

ENTRYPOINT ["/usr/bin/python3", "/github_pr_to_internal_pr.py"]