Skip to content

Commit de5abd3

Browse files
committed
fix(ci): Move checkout before platform-check composite action
Local composite actions (uses: ./.github/actions/...) require the repository to be checked out first. Move the actions/checkout step before platform-check and make it unconditional so the action file is available when GitHub Actions resolves it.
1 parent 1ef0114 commit de5abd3

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ jobs:
5959
- platform: 'android'
6060
ios-use-frameworks: 'dynamic-frameworks'
6161
steps:
62+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
63+
6264
- name: Check if platform is needed
6365
id: platform-check
6466
uses: ./.github/actions/platform-check
@@ -69,9 +71,6 @@ jobs:
6971
needs_android: ${{ needs.detect-changes.outputs.needs_android }}
7072
needs_web: ${{ needs.detect-changes.outputs.needs_web }}
7173

72-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
73-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
74-
7574
- name: Enable Corepack (NPM)
7675
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform != 'ios' }}
7776
run: npm i -g corepack

.github/workflows/sample-application.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
- ios-use-frameworks: 'dynamic-frameworks'
7575
platform: 'macos'
7676
steps:
77+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
78+
7779
- name: Check if platform is needed
7880
id: platform-check
7981
uses: ./.github/actions/platform-check
@@ -83,9 +85,6 @@ jobs:
8385
needs_ios: ${{ needs.detect-changes.outputs.needs_ios }}
8486
needs_android: ${{ needs.detect-changes.outputs.needs_android }}
8587

86-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
87-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
88-
8988
- name: Enable Corepack (NPM)
9089
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
9190
run: npm i -g corepack
@@ -249,6 +248,8 @@ jobs:
249248
build-type: 'production'
250249

251250
steps:
251+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
252+
252253
- name: Check if platform is needed
253254
id: platform-check
254255
uses: ./.github/actions/platform-check
@@ -258,9 +259,6 @@ jobs:
258259
needs_ios: ${{ needs.detect-changes.outputs.needs_ios }}
259260
needs_android: ${{ needs.detect-changes.outputs.needs_android }}
260261

261-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
262-
if: ${{ steps.platform-check.outputs.skip != 'true' }}
263-
264262
- name: Install Maestro
265263
if: ${{ steps.platform-check.outputs.skip != 'true' }}
266264
uses: dniHze/maestro-test-action@bda8a93211c86d0a05b7a4597c5ad134566fbde4 # pin@v1.0.0

0 commit comments

Comments
 (0)