-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "Build SquashFS Image" | ||
description: "Builds a SquashFS image using Docker" | ||
inputs: | ||
platform: | ||
description: "The platform to build for" | ||
required: true | ||
platform_suffix: | ||
description: "The platform suffix" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: build docker image | ||
shell: bash | ||
run: | | ||
cp ${{ env.OTACLIENT_WHL }} docker/app_img/ | ||
pushd docker/app_img | ||
docker buildx create --name builder_${{ inputs.platform_suffix }} | ||
docker buildx build --platform ${{ inputs.platform }} \ | ||
--build-arg=OTACLIENT_VERSION=${{ env.OTACLIENT_VERSION }} \ | ||
--build-arg=OTACLIENT_WHL=${{ env.OTACLIENT_WHL }} \ | ||
-t ${{ env.DOCKER_IMAGE }} \ | ||
--output type=docker \ | ||
. | ||
popd | ||
rm docker/app_img/${{ env.OTACLIENT_WHL }} | ||
- name: export squashfs image | ||
shell: bash | ||
run: | | ||
docker create --name ${{ env.DOCKER_CONTAINER }} ${{ env.DOCKER_IMAGE }} | ||
docker export ${{ env.DOCKER_CONTAINER }} | mksquashfs - ${{ env.SQUASHFS }} \ | ||
-tar -b 1M \ | ||
-mkfs-time 1729810800 \ | ||
-all-time 1729810800 \ | ||
-no-xattrs \ | ||
-all-root \ | ||
-progress \ | ||
-comp zstd \ | ||
-Xcompression-level 22 | ||
mv ${{ env.SQUASHFS }} dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters