Skip to content

Commit 624ca22

Browse files
committed
Address PR #2 review comments (round 2)
- Fix grep|awk pipelines in test script to not fail under set -e - Add --clobber to gh release upload for safe re-runs - Skip CI on fork PRs to protect self-hosted runner from untrusted code
1 parent b40a120 commit 624ca22

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ env:
1515
jobs:
1616
ci:
1717
name: Format, lint, build, and test
18-
# Self-hosted macOS runner required for CommonCrypto FFI and NAS access
18+
# Self-hosted macOS runner required for CommonCrypto FFI and NAS access.
19+
# Skip fork PRs to prevent untrusted code execution on self-hosted runners.
20+
if: github.event.pull_request.head.repo.full_name == github.repository
1921
runs-on: spiceai-macos
2022
permissions:
2123
contents: read

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
env:
4545
GH_TOKEN: ${{ github.token }}
4646
run: |
47-
gh release upload "${{ github.event.release.tag_name }}" \
47+
gh release upload "${{ github.event.release.tag_name }}" --clobber \
4848
target/release/spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz \
4949
target/release/spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz.sha256

scripts/test-sccache.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ echo "======================================="
271271
# ── Verify cache hits ───────────────────────────────────────────────────────
272272

273273
STATS=$(sccache --show-stats 2>&1)
274-
CACHE_HITS=$(echo "$STATS" | grep -m1 "^Cache hits" | awk '{print $NF}')
275-
WRITE_ERRORS=$(echo "$STATS" | grep -m1 "Cache write errors" | awk '{print $NF}')
274+
CACHE_HITS=$(echo "$STATS" | grep -m1 "^Cache hits" | awk '{print $NF}' || echo "0")
275+
WRITE_ERRORS=$(echo "$STATS" | grep -m1 "Cache write errors" | awk '{print $NF}' || echo "0")
276276

277277
echo ""
278278
if [[ "${CACHE_HITS:-0}" -gt 0 && "${WRITE_ERRORS:-0}" -eq 0 ]]; then

0 commit comments

Comments
 (0)