name: Cake Wallet Android on: push: pull_request: pull_request_target: jobs: debug-context: defaults: run: shell: bash runs-on: ubuntu-latest steps: - name: "1. Diagnostic Dump" env: # This dumps the entire JSON payload so you can see exactly what GitHub sees GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - name: "2. Check Condition Logic" run: | echo "Event Name: ${{ github.event_name }}" echo "Repo Full Name: ${{ github.repository }}" echo "Head Repo: ${{ github.event.pull_request.head.repo.full_name }}" echo "Is Fork: ${{ github.event.pull_request.head.repo.fork }}" echo "PR Number: ${{ github.event.number }}" echo "Head SHA: ${{ github.event.pull_request.head.sha }}" # PATH A: Internal PRs (Triggered by standard 'pull_request') internal-build: if: | github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false uses: ./.github/workflows/reusable-build.yml with: ref: ${{ github.event.pull_request.head.sha }} pr_number: ${{ github.head_ref || github.ref_name }} secrets: inherit # Passes all secrets automatically # PATH B: External Forks (Triggered by 'pull_request_target' for security) external-build: if: | github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork == true environment: external_contributors uses: ./.github/workflows/reusable-build.yml with: ref: ${{ github.event.pull_request.head.sha }} pr_number: ${{ github.head_ref || github.ref_name }} secrets: inherit