Skip to content

Commit 6c3eb43

Browse files
authored
Update pkgcheck.yaml
1 parent e623142 commit 6c3eb43

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/pkgcheck.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@ jobs:
2121
env:
2222
REVISER_FULL_TESTS: "true"
2323
steps:
24+
# pkgcheck-action checks the repo out on the host (as uid 1001), then
25+
# runs its checks in a Docker container as root. libgit2 in the image
26+
# refuses to open a repository owned by a different user, so the job
27+
# dies on the first git call:
28+
#
29+
# repository path '/github/workspace/' is not owned by current user
30+
#
31+
# The container mounts $RUNNER_TEMP/_github_home as its HOME, so writing
32+
# the git configuration there is what reaches it. Nothing in the package
33+
# can prevent this; the image is pinned upstream to :latest and started
34+
# enforcing ownership validation.
35+
- name: Mark the workspace safe for the pkgcheck container
36+
run: |
37+
mkdir -p "${RUNNER_TEMP}/_github_home"
38+
git config --file "${RUNNER_TEMP}/_github_home/.gitconfig" \
39+
--add safe.directory /github/workspace
40+
2441
- uses: ropensci-review-tools/pkgcheck-action@main
2542
continue-on-error: false
2643
with:

0 commit comments

Comments
 (0)