mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
name: Cake Wallet Android
|
|
|
|
on:
|
|
# Trigger 1: For Maintainers (Automatic, No Approval)
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
# Trigger 2: For Forks (Manual Approval via Environment)
|
|
pull_request_target:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
# PATH A: Internal PRs (Runs immediately)
|
|
internal-build:
|
|
if: |
|
|
github.event_name == 'pull_request' &&
|
|
github.event.pull_request.head.repo.full_name == github.repository
|
|
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 (Waits for Approval)
|
|
external-build:
|
|
if: |
|
|
github.event_name == 'pull_request_target' &&
|
|
github.event.pull_request.head.repo.full_name != github.repository
|
|
|
|
# This applies the specific environment rule ONLY to forks
|
|
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 |