Skip to content

Commit f9abd57

Browse files
try third option?
1 parent 1fc76d9 commit f9abd57

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/_test-integrations.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,22 @@ jobs:
5454
run: |
5555
brew update
5656
brew install openssl@3 || true
57-
BREW_PREFIX=$(brew --prefix)
58-
# path used by Homebrew's OpenSSL; adapt for runner architecture
59-
CERT_PEM="$BREW_PREFIX/etc/openssl@3/cert.pem"
57+
58+
# Prefer the CA bundle that ships with Homebrew's OpenSSL
59+
CERT_PEM="$(brew --prefix openssl@3)/etc/openssl@3/cert.pem"
60+
6061
if [ -f "$CERT_PEM" ]; then
61-
echo "SSL_CERT_FILE=$CERT_PEM" >> $GITHUB_ENV
62+
echo "Using Homebrew OpenSSL CA bundle at $CERT_PEM"
63+
echo "SSL_CERT_FILE=$CERT_PEM" >> "$GITHUB_ENV"
6264
else
63-
# Fallback: export system root certs to a PEM file and use it
64-
sudo security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain > /tmp/cacert.pem
65-
echo "SSL_CERT_FILE=/tmp/cacert.pem" >> $GITHUB_ENV
65+
echo "Homebrew CA bundle not found, exporting system roots..."
66+
security find-certificate -a -p \
67+
/System/Library/Keychains/SystemRootCertificates.keychain \
68+
> "$RUNNER_TEMP/cacert.pem"
69+
echo "SSL_CERT_FILE=$RUNNER_TEMP/cacert.pem" >> "$GITHUB_ENV"
6670
fi
6771
72+
6873
- name: Run Rspec for integration tests
6974
env:
7075
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}

0 commit comments

Comments
 (0)