we can't assume zombodb's repo, specifically for pull requests from forks.
@@ -58,11 +58,14 @@ jobs:
- name: hack Cargo.toml
run: |
export git_hash=$(git rev-parse --short $GITHUB_SHA)
+ export git_url=$(git config --get remote.origin.url)
echo "[patch.crates-io]" >> /tmp/sample/Cargo.toml
- echo "pgx = { git = \"https://github.com/zombodb/pgx\", package = \"pgx\", rev = \"${git_hash}\" }" >> /tmp/sample/Cargo.toml
- echo "pgx-macros = { git = \"https://github.com/zombodb/pgx\", package = \"pgx-macros\", rev = \"${git_hash}\" }" >> /tmp/sample/Cargo.toml
- echo "pgx-tests = { git = \"https://github.com/zombodb/pgx\", package = \"pgx-tests\", rev = \"${git_hash}\" }" >> /tmp/sample/Cargo.toml
- cat /tmp/sample/Cargo.toml
+ echo "pgx = { git = \"${git_url}\", package = \"pgx\", rev = \"${git_hash}\" }" >> /tmp/sample/Cargo.toml
+ echo "pgx-macros = { git = \"${git_url}\", package = \"pgx-macros\", rev = \"${git_hash}\" }" >> /tmp/sample/Cargo.toml
+ echo "pgx-tests = { git = \"${git_url}\", package = \"pgx-tests\", rev = \"${git_hash}\" }" >> /tmp/sample/Cargo.toml
+
+ - name: show Cargo.toml
+ run: cat /tmp/sample/Cargo.toml
# test that sample extension on all 4 Postgres'
- name: test sample on pg10
