Skip to content

Commit a3a4abd

Browse files
committed
chore: adjust CI to better serve external collaborators
1 parent 8b96a38 commit a3a4abd

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.github/workflows/pkg-pr.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
jobs:
88
pkg-pr:
99
runs-on: ubuntu-latest
10-
1110
steps:
1211
- name: Checkout code
1312
uses: actions/checkout@v4
@@ -22,7 +21,7 @@ jobs:
2221

2322
- name: Build
2423
run: bun run --filter alchemy build
25-
24+
2625
# pkr.pr.new relies on pnpm-workspace.yaml for the `--pnpm` flag
2726
# which we need to resolve `catalog:` dependencies prior to publishing
2827
- name: Prepare Publish

.github/workflows/pr-preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111

1212
jobs:
1313
deploy-preview:
14-
if: ${{ github.event.action != 'closed' }}
14+
if: (github.event.action != 'closed' && github.event.pull_request.head.repo.fork == false)
1515
runs-on: ubuntu-latest
1616
permissions:
1717
id-token: write
@@ -54,7 +54,7 @@ jobs:
5454
PULL_REQUEST: ${{ github.event.pull_request.number }}
5555

5656
cleanup-preview:
57-
if: ${{ github.event.action == 'closed' }}
57+
if: (github.event.action == 'closed' && github.event.pull_request.head.repo.fork == false)
5858
runs-on: ubuntu-latest
5959
permissions:
6060
id-token: write

.github/workflows/test.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ on:
99

1010
# Ensure only one workflow runs at a time
1111
concurrency:
12-
group: "tests-${{ github.ref }}"
12+
group: "tests-${{ github.event.pull_request.number }}"
1313
cancel-in-progress: false
1414

1515
jobs:
1616
test:
17+
if: github.event.pull_request.head.repo.fork == false
18+
1719
runs-on: ubuntu-latest
1820
permissions:
1921
id-token: write
@@ -30,14 +32,23 @@ jobs:
3032
with:
3133
node-version: "22"
3234

35+
- name: Setup Bun
36+
uses: oven-sh/setup-bun@v1
37+
with:
38+
bun-version: latest
39+
40+
- name: Install dependencies
41+
run: bun install
42+
3343
- name: Setup Alchemy Environment
3444
uses: ./.github/actions/setup-alchemy
45+
if: github.event.pull_request.head.repo.fork == false
3546
with:
3647
aws-role-arn: ${{ secrets.AWS_ROLE_ARN }}
3748
aws-region: us-west-2
3849

3950
- name: Check Types and Lint
40-
run: |
51+
run: |
4152
bun run build
4253
bun run check
4354
@@ -70,4 +81,3 @@ jobs:
7081
UPSTASH_API_KEY: ${{ env.UPSTASH_API_KEY }}
7182
UPSTASH_EMAIL: [email protected]
7283
VERCEL_ACCESS_TOKEN: ${{ env.VERCEL_ACCESS_TOKEN }}
73-

0 commit comments

Comments
 (0)