Skip to content

Commit b71323b

Browse files
Fix CI workflow syntax: move needs expression from job env to step if conditions
1 parent 903c284 commit b71323b

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/manual.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ jobs:
116116
build:
117117
needs: [detect-changes, compile-check]
118118
runs-on: ubuntu-latest
119-
env:
120-
BUILD_APP: ${{ needs.detect-changes.outputs.app_changed == 'true' || needs.detect-changes.outputs.shared_changed == 'true' }}
121-
BUILD_HUMANOPERATOR: ${{ needs.detect-changes.outputs.humanoperator_changed == 'true' || needs.detect-changes.outputs.shared_changed == 'true' }}
122119

123120
steps:
124121
- name: Checkout code
@@ -154,22 +151,22 @@ jobs:
154151
run: chmod +x gradlew
155152

156153
- name: Build app module (debug)
157-
if: env.BUILD_APP == 'true'
154+
if: needs.detect-changes.outputs.app_changed == 'true' || needs.detect-changes.outputs.shared_changed == 'true'
158155
run: ./gradlew :app:assembleDebug
159156

160157
- name: Build humanoperator module (debug)
161-
if: env.BUILD_HUMANOPERATOR == 'true'
158+
if: needs.detect-changes.outputs.humanoperator_changed == 'true' || needs.detect-changes.outputs.shared_changed == 'true'
162159
run: ./gradlew :humanoperator:assembleDebug
163160

164161
- name: Upload app APK
165-
if: env.BUILD_APP == 'true'
162+
if: needs.detect-changes.outputs.app_changed == 'true' || needs.detect-changes.outputs.shared_changed == 'true'
166163
uses: actions/upload-artifact@v4
167164
with:
168165
name: app-debug
169166
path: app/build/outputs/apk/debug/app-debug.apk
170167

171168
- name: Upload humanoperator APK
172-
if: env.BUILD_HUMANOPERATOR == 'true'
169+
if: needs.detect-changes.outputs.humanoperator_changed == 'true' || needs.detect-changes.outputs.shared_changed == 'true'
173170
uses: actions/upload-artifact@v4
174171
with:
175172
name: humanoperator-debug

0 commit comments

Comments
 (0)