|
91 | 91 | cache: ${{ inputs.package-manager != 'none' && inputs.package-manager || '' }} |
92 | 92 | cache-dependency-path: ${{ steps.lockfile.outputs.path }} |
93 | 93 |
|
94 | | - - name: Install dependencies |
95 | | - if: ${{ inputs.mode == 'full' || inputs.mode == 'build' }} |
96 | | - shell: bash |
97 | | - working-directory: ${{ inputs.working-directory }} |
98 | | - run: | |
99 | | - # Auto-detect install command based on package manager if using default |
100 | | - INSTALL_CMD="${{ inputs.install-command }}" |
101 | | - if [ "$INSTALL_CMD" == "npm ci" ]; then |
102 | | - case "${{ inputs.package-manager }}" in |
103 | | - pnpm) INSTALL_CMD="pnpm install --frozen-lockfile" ;; |
104 | | - yarn) INSTALL_CMD="yarn install --frozen-lockfile" ;; |
105 | | - esac |
106 | | - fi |
107 | | - $INSTALL_CMD |
108 | | -
|
109 | 94 | - name: Parse build environment variables |
110 | 95 | if: ${{ inputs.mode == 'full' || inputs.mode == 'build' }} |
111 | 96 | id: build-env |
@@ -227,6 +212,26 @@ runs: |
227 | 212 | fi |
228 | 213 | echo "::endgroup::" |
229 | 214 |
|
| 215 | + - name: Install dependencies |
| 216 | + if: ${{ inputs.mode == 'full' || inputs.mode == 'build' }} |
| 217 | + shell: bash |
| 218 | + working-directory: ${{ inputs.working-directory }} |
| 219 | + run: | |
| 220 | + # Source build environment variables if they exist |
| 221 | + if [ -f /tmp/build-env.sh ]; then |
| 222 | + source /tmp/build-env.sh |
| 223 | + fi |
| 224 | +
|
| 225 | + # Auto-detect install command based on package manager if using default |
| 226 | + INSTALL_CMD="${{ inputs.install-command }}" |
| 227 | + if [ "$INSTALL_CMD" == "npm ci" ]; then |
| 228 | + case "${{ inputs.package-manager }}" in |
| 229 | + pnpm) INSTALL_CMD="pnpm install --frozen-lockfile" ;; |
| 230 | + yarn) INSTALL_CMD="yarn install --frozen-lockfile" ;; |
| 231 | + esac |
| 232 | + fi |
| 233 | + $INSTALL_CMD |
| 234 | +
|
230 | 235 | - name: Build Worker |
231 | 236 | if: ${{ inputs.mode == 'full' || inputs.mode == 'build' }} |
232 | 237 | shell: bash |
|
0 commit comments