Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 3e6fff9

Browse files
committed
chore: add more security walls
1 parent 209f8eb commit 3e6fff9

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/preview-build.yml

Lines changed: 4 additions & 2 deletions
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/functions-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 }}
@@ -76,7 +78,7 @@ jobs:
7678
echo "${{ steps.preview.outputs.url }}" > preview-info/preview-url.txt
7779
echo "${{ github.event.pull_request.number }}" > preview-info/pr-number.txt
7880
echo "${{ github.event.pull_request.head.sha }}" > preview-info/commit-sha.txt
79-
echo "realtime-js" > preview-info/package-name.txt
81+
echo "functions-js" > preview-info/package-name.txt
8082
8183
- name: Upload preview info
8284
uses: actions/upload-artifact@v4

.github/workflows/preview-comment.yml

Lines changed: 4 additions & 1 deletion
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/functions-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
@@ -101,7 +104,7 @@ jobs:
101104
102105
${{ github.event.workflow_run.name == 'Trigger Supabase JS Tests' && github.event.workflow_run.conclusion == 'success' && '✅ **Supabase-js tests triggered successfully!**
103106
104-
The integration tests are now running. Results will be posted in the supabase-js repository when complete.' || '' }}
107+
The integration tests are now running. Results will be posted here when complete.' || '' }}
105108
106109
${{ github.event.workflow_run.name == 'Trigger Supabase JS Tests' && github.event.workflow_run.conclusion == 'failure' && '⚠️ **Failed to trigger supabase-js tests**
107110

.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/functions-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)