Skip to content

Commit e7a97b7

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 f7b7026 commit e7a97b7

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
@@ -43,6 +50,7 @@ runs:
4350
using: "composite"
4451
steps:
4552
- name: Install dependencies
53+
if: ${{ inputs.skip-dependencies != 'true' }}
4654
shell: bash
4755
run: |
4856
if [ "${{ runner.os }}" = "Windows" ]; then
@@ -147,13 +155,14 @@ runs:
147155
west packages pip --install --ignore-venv-check || pip3 install -r zephyr/scripts/requirements.txt
148156
149157
- name: Cache Zephyr SDK
158+
if: ${{ inputs.skip-dependencies != 'true' }}
150159
id: cache-toolchain
151160
uses: actions/cache@v4
152161
with:
153162
path: ${{ inputs.base-path }}/zephyr-sdk
154163
key: ${{ env.SDK_FILE }}-${{ inputs.toolchains }}
155164

156-
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
165+
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && inputs.skip-dependencies != 'true' }}
157166
working-directory: ${{ inputs.base-path }}
158167
name: Download Zephyr SDK
159168
shell: bash
@@ -168,6 +177,7 @@ runs:
168177
fi
169178
170179
- name: Setup Zephyr SDK
180+
if: ${{ inputs.skip-dependencies != 'true' }}
171181
working-directory: ${{ inputs.base-path }}/zephyr-sdk
172182
shell: bash
173183
run: |

0 commit comments

Comments
 (0)