Skip to content

implement RPC support for inbound UDP connect() event #14029

implement RPC support for inbound UDP connect() event

implement RPC support for inbound UDP connect() event #14029

name: Run internal build

Check warning on line 1 in .github/workflows/internal-build.yml

View workflow run for this annotation

GitHub Actions / Run internal build

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
# Read-only permissions are enough
permissions: read-all
concurrency:
# Cancel existing builds for the same PR.
# Otherwise, all other builds will be allowed to run through.
group: internal-build-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
internal-build:
runs-on: ubuntu-latest
steps:
# Check if this is a fork and if the owner is a Cloudflare org member
- name: Check fork status and org membership
if: github.event.pull_request.head.repo.fork
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORK_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
run: |
echo "Fork detected. Checking if $FORK_OWNER is a Cloudflare org member..."
if gh api "orgs/cloudflare/members/$FORK_OWNER" --silent 2>/dev/null; then
echo "✓ Cloudflare org member confirmed"
else
echo "✗ Fork owner '$FORK_OWNER' is not a public Cloudflare org member."
echo ""
echo "GitHub's public membership API cannot verify private organization membership."
echo "If you are a Cloudflare org member, open the page below, find your account,"
echo "change your organization visibility from Private to Public, and re-run this workflow:"
echo "https://github.com/orgs/cloudflare/people"
echo ""
echo "If you are an external contributor, please ask the auto-assigned reviewers for help."
exit 1
fi
- name: Checkout trusted workflow tooling
uses: actions/checkout@v7
with:
path: trusted
persist-credentials: false
show-progress: false
# Try to checkout the merge commit - will fail if PR isn't mergeable
- uses: actions/checkout@v7
id: checkout_merge
continue-on-error: true
with:
# Fork PRs reach this step only after their owner is confirmed to be a
# public Cloudflare org member. Workflow tooling runs from the trusted checkout.
allow-unsafe-pr-checkout: true
path: pull-request
persist-credentials: false
ref: refs/pull/${{ github.event.pull_request.number }}/merge
show-progress: false
# Fail the workflow if checkout failed (PR isn't mergeable)
- name: Fail if PR isn't mergeable
if: steps.checkout_merge.outcome != 'success'
run: |
echo "The pull request is not mergeable. Please rebase and resolve any conflicts."
exit 1
- name: Run internal build
working-directory: trusted
env:
CI_URL: ${{ secrets.CI_URL }}
CI_CLIENT_ID: ${{ secrets.CI_CF_ACCESS_CLIENT_ID }}
CI_CLIENT_SECRET: ${{ secrets.CI_CF_ACCESS_CLIENT_SECRET }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
FORK_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
run: |
# Format ref based on whether this is a fork
if [ "${{ github.event.pull_request.head.repo.fork }}" = "true" ]; then
REF="$FORK_OWNER/$HEAD_REF"
else
REF="$HEAD_REF"
fi
python3 -u ./tools/cross/internal_build.py \
${{github.event.pull_request.number}} \
${{steps.checkout_merge.outputs.commit}} \
${{github.event.pull_request.head.sha}} \
${{github.run_attempt}} \
"$REF" \
$CI_URL \
$CI_CLIENT_ID \
$CI_CLIENT_SECRET