Skip to content

Commit

Permalink
chore(install): fail any e2e tests when not running from the source repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien4218 committed Oct 18, 2023
1 parent c33558d commit 9f87f18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/local-repo-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
limit_main_pr:
runs-on: ubuntu-latest
steps:
# 1) Check for all incoming changes to files under `recipes` directory
- name: Ensure no fork repo
if: ${{ github.event_name == 'pull_request' }}
run: |
SOURCE_NAME=$(echo ${{ github.event.pull_request.head.repo.full_name }})
REMOTE_NAME=$(echo ${{ github.event.pull_request.base.repo.full_name }})
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ jobs:
with:
fetch-depth: 0

- name: Ensure no fork repo
if: ${{ github.event_name == 'pull_request' }}
run: |
SOURCE_NAME=$(echo ${{ github.event.pull_request.head.repo.full_name }})
REMOTE_NAME=$(echo ${{ github.event.pull_request.base.repo.full_name }})
if [ $SOURCE_NAME != $REMOTE_NAME ]; then
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."
exit 1
fi
# 1) Check for all incoming changes to files under `recipes` directory
- name: Get Changed Files
id: getfile
Expand Down

0 comments on commit 9f87f18

Please sign in to comment.