Skip to content

Commit aa5d8a7

Browse files
committed
Smallish workflow update
1 parent ddfeed8 commit aa5d8a7

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

.github/workflows/detect-changes.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
name: Detect Changes
22
on:
33
workflow_call:
4+
inputs:
5+
# Pass the caller's event name and ref so we can detect push-to-main/release.
6+
# Inside a reusable workflow github.event_name is always 'workflow_call',
7+
# so the caller must forward the real values explicitly.
8+
caller_event_name:
9+
description: 'The triggering event name from the caller (github.event_name)'
10+
required: true
11+
type: string
12+
caller_ref:
13+
description: 'The triggering ref from the caller (github.ref)'
14+
required: true
15+
type: string
416
outputs:
517
# Raw filter outputs
618
ios_native:
@@ -64,7 +76,7 @@ jobs:
6476
JS_SOURCE: ${{ steps.filter.outputs.js_source }}
6577
CI_CHANGED: ${{ steps.filter.outputs.ci }}
6678
E2E_TESTS: ${{ steps.filter.outputs.e2e_tests }}
67-
IS_MAIN_OR_RELEASE: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
79+
IS_MAIN_OR_RELEASE: ${{ inputs.caller_event_name == 'push' && (inputs.caller_ref == 'refs/heads/main' || startsWith(inputs.caller_ref, 'refs/heads/release/')) }}
6880
run: |
6981
echo "--- Change Detection Summary ---"
7082
echo "ios_native=$IOS_NATIVE"

.github/workflows/e2e-v2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
detect-changes:
3333
needs: [ready-to-merge-gate]
3434
uses: ./.github/workflows/detect-changes.yml
35+
with:
36+
caller_event_name: ${{ github.event_name }}
37+
caller_ref: ${{ github.ref }}
3538
auth_token_check:
3639
uses: ./.github/workflows/skip-ci-noauth.yml
3740
secrets: inherit

.github/workflows/native-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
detect-changes:
2828
needs: [ready-to-merge-gate]
2929
uses: ./.github/workflows/detect-changes.yml
30+
with:
31+
caller_event_name: ${{ github.event_name }}
32+
caller_ref: ${{ github.ref }}
3033

3134
test-ios:
3235
name: ios

.github/workflows/sample-application-expo.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
detect-changes:
3131
needs: [ready-to-merge-gate]
3232
uses: ./.github/workflows/detect-changes.yml
33+
with:
34+
caller_event_name: ${{ github.event_name }}
35+
caller_ref: ${{ github.ref }}
3336

3437
build:
3538
name: Build ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks}}

.github/workflows/sample-application.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
detect-changes:
3939
needs: [ready-to-merge-gate]
4040
uses: ./.github/workflows/detect-changes.yml
41+
with:
42+
caller_event_name: ${{ github.event_name }}
43+
caller_ref: ${{ github.ref }}
4144

4245
build:
4346
name: Build ${{ matrix.rn-architecture }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks}}

0 commit comments

Comments
 (0)