Skip to content

Commit 54f0823

Browse files
committed
chore: add more security walls
1 parent d9d674b commit 54f0823

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/preview-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ on:
1515

1616
jobs:
1717
build-preview:
18-
# Only run if PR has the 'trigger: preview' label
18+
# Only run if PR has the 'trigger: preview' label and is on the correct repository
1919
if: |
20+
github.repository == 'supabase/postgrest-js' &&
2021
contains(github.event.pull_request.labels.*.name, 'trigger: preview')
2122
runs-on: ubuntu-latest
23+
timeout-minutes: 15
2224
outputs:
2325
preview-url: ${{ steps.preview.outputs.url }}
2426
pr-number: ${{ github.event.pull_request.number }}

.github/workflows/preview-comment.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ on:
1111

1212
jobs:
1313
update-comment:
14+
# Only run on the correct repository
15+
if: github.repository == 'supabase/postgrest-js'
1416
runs-on: ubuntu-latest
17+
timeout-minutes: 5
1518
steps:
1619
# Get PR number from the workflow run
1720
- name: Get PR info

.github/workflows/trigger-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ on:
2222

2323
jobs:
2424
trigger-tests:
25-
# Only run if the preview build succeeded
26-
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
25+
# Only run if the preview build succeeded and on the correct repository
26+
if: |
27+
github.repository == 'supabase/postgrest-js' &&
28+
(github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
2729
runs-on: ubuntu-latest
30+
timeout-minutes: 10
2831
steps:
2932
# For workflow_run trigger, download the preview info
3033
- name: Download preview info

0 commit comments

Comments
 (0)