name: E2E Tests on: pull_request: types: [opened, synchronize, reopened] branches: ['**'] # run for PRs targeting any branch (main and others) paths-ignore: &ignore_paths - 'docs/**' - '*.md' - '.golangci.yml' - '.gitignore' - '.dockerignore' - 'LICENSE' push: branches: [main] paths-ignore: *ignore_paths concurrency: group: e2e-${{ github.event.pull_request.head.ref }} cancel-in-progress: true # cancel previous job runs for the same branch jobs: check-external-pr: runs-on: ubuntu-latest if: github.event_name == 'pull_request' steps: - name: Check if PR is from external contributor run: | if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then echo "❌ External PR detected. This workflow requires approval from a maintainer." echo "Please ask a maintainer to run '/ok-to-test' command to trigger the fork workflow." exit 1 fi echo "✅ Internal PR detected. Proceeding with tests." e2e-test: needs: check-external-pr if: always() && (needs.check-external-pr.result == 'success' || github.event_name != 'pull_request') uses: ./.github/workflows/e2e-tests.yml secrets: OP_CONNECT_CREDENTIALS: ${{ secrets.OP_CONNECT_CREDENTIALS }} OP_CONNECT_TOKEN: ${{ secrets.OP_CONNECT_TOKEN }} OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}