Skip to content

Commit fcabf76

Browse files
Julien4218sanderblue
authored andcommitted
chore(install): fail any e2e tests when not running from the source repo
1 parent c33558d commit fcabf76

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/local-repo-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
limit_main_pr:
1010
runs-on: ubuntu-latest
1111
steps:
12-
# 1) Check for all incoming changes to files under `recipes` directory
1312
- name: Ensure no fork repo
13+
if: ${{ github.event_name == 'pull_request' }}
1414
run: |
1515
SOURCE_NAME=$(echo ${{ github.event.pull_request.head.repo.full_name }})
1616
REMOTE_NAME=$(echo ${{ github.event.pull_request.base.repo.full_name }})

.github/workflows/validation.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ jobs:
6060
with:
6161
fetch-depth: 0
6262

63+
- name: Ensure no fork repo
64+
if: ${{ github.event_name == 'pull_request' }}
65+
run: |
66+
SOURCE_NAME=$(echo ${{ github.event.pull_request.head.repo.full_name }})
67+
REMOTE_NAME=$(echo ${{ github.event.pull_request.base.repo.full_name }})
68+
if [ $SOURCE_NAME != $REMOTE_NAME ]; then
69+
echo "PR should be created from a branch on the source repo, not from a fork, so the E2E tests can run. If you need access please reach out to the #help-virtuoso channel."
70+
exit 1
71+
fi
72+
6373
# 1) Check for all incoming changes to files under `recipes` directory
6474
- name: Get Changed Files
6575
id: getfile

0 commit comments

Comments
 (0)