1414 description : ' Use latest release artifacts instead of workflow artifacts'
1515 type : boolean
1616 default : false
17-
17+ pull_request :
18+ types : [labeled]
1819jobs :
1920 create-image :
2021 name : Create SD Card Image for ${{ inputs.board }}
@@ -66,15 +67,15 @@ jobs:
6667 # Download from latest bootloader build workflow on main branch
6768 gh run list --workflow=build-boot.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_boot_run_id
6869 BOOT_RUN_ID=$(cat latest_boot_run_id)
69-
70+
7071 gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER} --dir temp_bootloader/
71-
72+
7273 # Extract bootloader directly to output/images
7374 cd temp_bootloader/
7475 tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
7576 cd ../
7677 rm -rf temp_bootloader/
77-
78+
7879 echo "Bootloader files extracted to output/images:"
7980 ls -la output/images/
8081 env :
@@ -86,15 +87,15 @@ jobs:
8687 # Download from latest Infix build workflow for main branch
8788 gh run list --workflow=build.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_infix_run_id
8889 INFIX_RUN_ID=$(cat latest_infix_run_id)
89-
90+
9091 gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
91-
92+
9293 # Extract Infix directly to output/images
9394 cd temp_infix/
9495 tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
9596 cd ../
9697 rm -rf temp_infix/
97-
98+
9899 echo "Infix files extracted to output/images:"
99100 ls -la output/images/
100101 env :
@@ -109,14 +110,14 @@ jobs:
109110 tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
110111 cd ../
111112 rm -rf temp_bootloader/
112-
113+
113114 # Download latest Infix release
114115 gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
115116 cd temp_infix/
116117 tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
117118 cd ../
118119 rm -rf temp_infix/
119-
120+
120121 echo "All files extracted to output/images:"
121122 ls -la output/images/
122123 env :
@@ -135,10 +136,10 @@ jobs:
135136 export BINARIES_DIR=$PWD/output/images
136137 export BUILD_DIR=$PWD/build
137138 export BR2_EXTERNAL_INFIX_PATH=$PWD
138-
139+
139140 # Use the standardized mkimage.sh path for the selected board
140141 BOARD_SCRIPT="src/board/${{ inputs.board }}/mkimage.sh"
141-
142+
142143 if [ -f "$BOARD_SCRIPT" ]; then
143144 echo "Using board-specific image creation script: $BOARD_SCRIPT"
144145 chmod +x "$BOARD_SCRIPT"
@@ -152,7 +153,7 @@ jobs:
152153 run : |
153154 echo "Contents of output/images after mkimage.sh:"
154155 ls -lh output/images/
155-
156+
156157 # Look for SD card image with pattern: *-sdcard.img
157158 if ls output/images/*-sdcard.img 1> /dev/null 2>&1; then
158159 echo "Found SD card image(s):"
@@ -201,15 +202,15 @@ jobs:
201202 run : |
202203 cat <<EOF >> $GITHUB_STEP_SUMMARY
203204 # SD Card Image Build Complete! 🚀
204-
205+
205206 **Board:** ${{ inputs.board }}
206- **Target:** ${{ env.TARGET }}
207+ **Target:** ${{ env.TARGET }}
207208 **Bootloader:** ${{ env.BOOTLOADER }}
208209 **Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
209-
210+
210211 ## Created Images
211212 $(find output/images/ -name "*.img" -o -name "*.qcow2" -o -name "*.raw" | xargs ls -lh 2>/dev/null | sed 's/^/- /' || echo "- No images found")
212-
213+
213214 ## Download
214215 The SD card image is available as a workflow artifact above.
215- EOF
216+ EOF
0 commit comments