Skip to content

Commit cd43e1d

Browse files
authored
updated logic
1 parent 97dc9f3 commit cd43e1d

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

.github/actions/aws_s3_helper/action.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,39 @@ runs:
1515
steps:
1616
- name: Build kernel
1717
shell: bash
18+
env:
19+
DOCKER_IMAGE: ${{ inputs.docker_image }}
20+
WORKSPACE_PATH: ${{ inputs.workspace_path }}
1821
run: |
22+
set -euo pipefail
23+
1924
docker run --rm \
20-
-v "${{ inputs.workspace_path }}:${{ inputs.workspace_path }}" \
21-
-w "${{ inputs.workspace_path }}/kernel" \
22-
--user $(id -u):$(id -g) \
23-
${{ inputs.docker_image }} \
24-
bash -c "
25+
-v "$WORKSPACE_PATH:$WORKSPACE_PATH" \
26+
-w "$WORKSPACE_PATH/kernel" \
27+
--user "$(id -u):$(id -g)" \
28+
"$DOCKER_IMAGE" \
29+
bash -c '
2530
make O=../kobj ARCH=arm64 defconfig &&
26-
make O=../kobj -j\$(nproc) &&
27-
make O=../kobj -j\$(nproc) dir-pkg INSTALL_MOD_STRIP=1
28-
"
31+
make O=../kobj -j$(nproc) &&
32+
make O=../kobj -j$(nproc) dir-pkg INSTALL_MOD_STRIP=1
33+
'
2934
3035
- name: Build video-driver
3136
shell: bash
37+
env:
38+
DOCKER_IMAGE: ${{ inputs.docker_image }}
39+
WORKSPACE_PATH: ${{ inputs.workspace_path }}
3240
run: |
41+
set -euo pipefail
42+
3343
docker run --rm \
34-
-v "${{ inputs.workspace_path }}:${{ inputs.workspace_path }}" \
35-
-w "${{ inputs.workspace_path }}/video-driver" \
36-
--user $(id -u):$(id -g) \
37-
${{ inputs.docker_image }} \
38-
bash -c "
44+
-v "$WORKSPACE_PATH:$WORKSPACE_PATH" \
45+
-w "$WORKSPACE_PATH/video-driver" \
46+
--user "$(id -u):$(id -g)" \
47+
-e WORKSPACE_PATH="$WORKSPACE_PATH" \
48+
"$DOCKER_IMAGE" \
49+
bash -c '
3950
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CC=aarch64-linux-gnu-gcc-13 \
40-
-C ${{ inputs.workspace_path }}/kobj \
41-
M=\$(pwd) VIDEO_KERNEL_ROOT=\$(pwd) modules
42-
"
51+
-C "$WORKSPACE_PATH/kobj" \
52+
M="$(pwd)" VIDEO_KERNEL_ROOT="$(pwd)" modules
53+
'

0 commit comments

Comments
 (0)