Skip to content

Commit

Permalink
Merge pull request #24 from chipsalliance/git-fix
Browse files Browse the repository at this point in the history
Fix git error in container
  • Loading branch information
tgorochowik authored Mar 22, 2023
2 parents 9c4778d + 2049f5f commit 7222528
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/env bash

set -x

event_file=event.json
diff_cmd="git diff FECH_HEAD"

# XXX: workaround for "fatal: detected dubious ownership in repository" when running in a container
git config --global --add safe.directory '*'

if [ -f "$event_file" ]; then
pr_branch=$(python3 -c "import sys, json; print(json.load(sys.stdin)['pull_request']['head']['ref'])" < event.json)
base_branch=$(python3 -c "import sys, json; print(json.load(sys.stdin)['pull_request']['base']['ref'])" < event.json)
Expand Down

0 comments on commit 7222528

Please sign in to comment.