Skip to content

Commit

Permalink
Try this
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jan 19, 2024
1 parent 06651f0 commit 7912397
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- uses: actions/checkout@v4
- name: Build Image
run: docker build -t pgxn-tools-test .
- name: Test as root
run: "docker run --rm --volume \"$(pwd)/test:/repo\" pgxn-tools-test /repo/runtest.sh ${{ matrix.pg }}"
# - name: Test as root
# run: "docker run --rm --volume \"$(pwd)/test:/repo\" pgxn-tools-test /repo/runtest.sh ${{ matrix.pg }}"
- name: Test as non-root
run: "docker run --rm --volume \"$(pwd)/test:/repo\" -e AS_USER=worker pgxn-tools-test /repo/runtest.sh ${{ matrix.pg }}"

Expand Down
2 changes: 1 addition & 1 deletion bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

# Ensure Git can do stuff in the working directory.
# https://github.com/pgxn/docker-pgxn-tools/issues/5
git config --system --add safe.directory "$PWD"
sh -c "git config --global --add safe.directory $PWD"

# Just continue if unprivileged user not requested.
[ -z "$AS_USER" ] && exec "$@"
Expand Down
3 changes: 3 additions & 0 deletions bin/pgxn-bundle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ fi
DISTNAME=${PGXN_DIST_NAME:-$(perl -MJSON=decode_json -E 'say decode_json(join "", <>)->{name}' META.json)}
VERSION=${PGXN_DIST_VERSION:-$(perl -MJSON=decode_json -E 'say decode_json(join "", <>)->{version}' META.json)}

echo WHAT IS IN THE SAFE DIRECTORY
git config safe.directory

# Now bundle up the distribution for release.
release=${DISTNAME}-${VERSION}
if [ "true" == "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then
Expand Down

0 comments on commit 7912397

Please sign in to comment.