@@ -182,44 +182,58 @@ jobs:
182182
183183 - name : Check if any packages were built
184184 run : |
185- if [ -n "$(find . -maxdepth 1 -type f -name '*.ipk ' -print -quit)" ]; then
186- echo "Found *.ipk files"
187- HAVE_IPKS =true
185+ if [ -n "$(find . -maxdepth 1 -type f -name '*.[ai]pk ' -print -quit)" ]; then
186+ echo "Found *.ipk or *.apk files"
187+ HAVE_PKGS =true
188188 else
189- echo "No *.ipk files found"
190- HAVE_IPKS =false
189+ echo "No *.ipk or *.apk files found"
190+ HAVE_PKGS =false
191191 fi
192- echo "HAVE_IPKS=$HAVE_IPKS " >> $GITHUB_ENV
192+ echo "HAVE_PKGS=$HAVE_PKGS " >> $GITHUB_ENV
193193
194194 - name : Register QEMU
195- if : ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS ) }}
195+ if : ${{ matrix.runtime_test && fromJSON(env.HAVE_PKGS ) }}
196196 run : |
197197 sudo apt-get update
198198 sudo apt-get install -y qemu-user-static binfmt-support
199199 sudo update-binfmts --import
200200
201201 - name : Checkout
202- if : ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS ) }}
202+ if : ${{ matrix.runtime_test && fromJSON(env.HAVE_PKGS ) }}
203203 uses : actions/checkout@v4
204204 with :
205205 repository : openwrt/actions-shared-workflows
206206 path : dockerfiles_feeds
207207 sparse-checkout : |
208208 .github/scripts/ci_helpers.sh
209+ .github/scripts/get-rootfs-url.py
209210 .github/dockerfiles_feeds/Dockerfile
210211 .github/dockerfiles_feeds/entrypoint.sh
211212 sparse-checkout-cone-mode : false
212213
214+ - name : Get rootfs file name
215+ if : ${{ matrix.runtime_test }}
216+ run : |
217+ ROOTFSFILE=$(dockerfiles_feeds/.github/scripts/get-rootfs-url.py)
218+ echo $ROOTFSFILE
219+ if [ -z "$ROOTFSFILE" ] ; then echo "no rootfs" ; exit 1 ; fi
220+ docker import $ROOTFSFILE openwrt/rootfs:$ARCH
221+ docker images
222+ env :
223+ ARCH : ${{ matrix.arch }}-${{ env.BRANCH }}
224+ BRANCH : ${{ env.BRANCH }}
225+ TARGET : ${{ matrix.target }}
226+
213227 - name : Build Docker container
214- if : ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS ) }}
228+ if : ${{ matrix.runtime_test && fromJSON(env.HAVE_PKGS ) }}
215229 run : |
216230 docker build --platform linux/${{ matrix.arch }} -t test-container \
217231 --build-arg ARCH dockerfiles_feeds/.github/dockerfiles_feeds/
218232 env :
219233 ARCH : ${{ matrix.arch }}-${{ env.BRANCH }}
220234
221235 - name : Test via Docker container
222- if : ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS ) }}
236+ if : ${{ matrix.runtime_test && fromJSON(env.HAVE_PKGS ) }}
223237 run : |
224238 docker run --platform linux/${{ matrix.arch }} --rm -v $GITHUB_WORKSPACE:/ci \
225239 -v $GITHUB_WORKSPACE/dockerfiles_feeds:/dockerfiles_feeds \
0 commit comments