Skip to content

Commit 6ed9b10

Browse files
action: support skipping dependencies for running in container
Support skipping os dependencies within the action. This is useful when running in a container where these dependencies are present. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 223f44d commit 6ed9b10

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ inputs:
3434
required: false
3535
default: https://github.com/zephyrproject-rtos/sdk-ng/releases/download
3636

37+
skip-dependencies:
38+
description: |
39+
Set to 'true' to skip installation of SDK and OS dependencies. Useful
40+
when running action within a container
41+
required: false
42+
default: 'false'
43+
3744
toolchains:
3845
description: List of toolchains to install, colon separated
3946
required: false
@@ -53,6 +60,7 @@ runs:
5360
using: "composite"
5461
steps:
5562
- name: Install dependencies
63+
if: ${{ inputs.skip-dependencies != 'true' }}
5664
shell: bash
5765
run: |
5866
if [ "${{ runner.os }}" = "Windows" ]; then
@@ -163,13 +171,14 @@ runs:
163171
west packages pip --install --ignore-venv-check || pip3 install -r zephyr/scripts/requirements.txt
164172
165173
- name: Cache Zephyr SDK
174+
if: ${{ inputs.skip-dependencies != 'true' }}
166175
id: cache-toolchain
167176
uses: actions/cache@v4
168177
with:
169178
path: ${{ inputs.base-path }}/zephyr-sdk
170179
key: ${{ env.SDK_FILE }}-${{ inputs.toolchains }}
171180

172-
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
181+
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && inputs.skip-dependencies != 'true' }}
173182
working-directory: ${{ inputs.base-path }}
174183
name: Download Zephyr SDK
175184
shell: bash
@@ -184,6 +193,7 @@ runs:
184193
fi
185194
186195
- name: Setup Zephyr SDK
196+
if: ${{ inputs.skip-dependencies != 'true' }}
187197
working-directory: ${{ inputs.base-path }}/zephyr-sdk
188198
shell: bash
189199
run: |

0 commit comments

Comments
 (0)