diff --git a/.github/workflows/build-sd-images.yml b/.github/workflows/build-sd-images.yml index 0c2f27f90..61feae474 100644 --- a/.github/workflows/build-sd-images.yml +++ b/.github/workflows/build-sd-images.yml @@ -38,11 +38,13 @@ jobs: artifact_file: ${{ env.ARTIFACT_FILE }} artifact_name: ${{ github.run_id }}-${{ inputs.board_id }}-image steps: -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 - - name: Setup qemu-user-static + - name: Set up QEMU run: | sudo apt-get update + sudo apt-get install -y binfmt-support + curl -L -o /tmp/qemu.sh 'https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh' + bash /tmp/qemu.sh --debian +# docker run --rm --privileged tonistiigi/binfmt:latest --install all # docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes # sudo mkdir -p /etc/binfmt # for conf in qemu-{aarch64,arm}-static.conf @@ -64,7 +66,7 @@ jobs: continue-on-error: true run: | set -ex - export IMG="NextCloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img" + export IMG="NextcloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img" [[ "${{ github.ref_protected }}" == true ]] || export DBG=x ./build/build-SD-armbian.sh "${{ inputs.board_id }}" "${{ inputs.board_name }}" @@ -82,7 +84,7 @@ jobs: echo -e "${LOG_CICD} Cleanup armbian build leftovers..." sudo rm -rf armbian/ tmp/ output/ - export IMG="NextCloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img" + export IMG="NextcloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img" [[ "${{ github.ref_protected }}" == true ]] || export DBG=x ./build/build-SD-armbian.sh "${{ inputs.board_id }}" "${{ inputs.board_name }}" @@ -104,7 +106,7 @@ jobs: run: | set -ex echo -e "${LOG_CICD} Protected? ${{ github.ref_protected }}" - export IMG="NextCloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img" + export IMG="NextcloudPi_${{ inputs.board_name }}_${VERSION//\//_}.img" [[ "${{ github.ref_protected }}" == true ]] || export DBG=x wget -q https://github.com/multiarch/qemu-user-static/releases/latest/download/qemu-aarch64-static -O ./qemu-aarch64-static ./build/build-SD-rpi.sh @@ -144,22 +146,17 @@ jobs: run: shell: bash steps: -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 - - name: Apt update + - name: Set up QEMU run: | sudo apt-get update -# sudo apt-get -y --no-install-recommends install qemu-user-static -# - name: Apply workaround for sudo bug (https://github.com/multiarch/qemu-user-static/issues/17) -# run: | -# sudo apt-get update -# sudo apt-get -y --no-install-recommends install binfmt-support qemu-user-static -# docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes -# sudo mkdir -p /etc/binfmt -# for conf in qemu-{aarch64,arm}-static.conf -# do -# sed 's/:F$/:OC/' /usr/lib/binfmt.d/$conf | sudo tee /etc/binfmt/$conf -# done + sudo apt-get install -y binfmt-support + docker run --rm --privileged tonistiigi/binfmt:latest --install all + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + # sudo mkdir -p /etc/binfmt + # for conf in qemu-{aarch64,arm}-static.conf + # do + # sed 's/:F$/:OC/' /usr/lib/binfmt.d/$conf | sudo tee /etc/binfmt/$conf + # done - name: Checkout code uses: actions/checkout@v3 with: diff --git a/build/build-SD-armbian.sh b/build/build-SD-armbian.sh index 4a10d5ece..a8f30a1b9 100755 --- a/build/build-SD-armbian.sh +++ b/build/build-SD-armbian.sh @@ -32,6 +32,7 @@ prepare_dirs # tmp cache output # get latest armbian [[ -d armbian ]] || { git clone --depth 100 https://github.com/armbian/build armbian + git checkout c47c9372bf6970d6ca8c32bc5f7ec2a1416ab5bd } #( cd armbian && git pull --ff-only --tags && git checkout v23.02 ) #sed -i -e '/export rootfs_size=/s/du -sm/du --apparent-size -sm/' armbian/lib/functions/image/partitioning.sh