Skip to content

Commit bb23eb2

Browse files
committed
ci: Add container owner mismatch workaround
The owner UID of the GITHUB_WORKSPACE directory may not match the container user UID because of the way GitHub Actions runner is implemented, and this can cause the Git operations to fail unless the workspace directory is explicitly listed as a "safe directory." For more details, refer to the following GitHub issue: actions/checkout#760 Remove this workaround when GitHub comes up with a fundamental fix for this problem. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
1 parent 53c3456 commit bb23eb2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,14 @@ jobs:
816816
host: ${{ fromJSON(needs.setup.outputs.hosts) }}
817817

818818
steps:
819+
- name: Apply container owner mismatch workaround
820+
run: |
821+
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
822+
# match the container user UID because of the way GitHub
823+
# Actions runner is implemented. Remove this workaround when
824+
# GitHub comes up with a fundamental fix for this problem.
825+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
826+
819827
- name: Set up build environment (Linux)
820828
if: ${{ runner.os == 'Linux' }}
821829
run: |

0 commit comments

Comments
 (0)