Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
airkei committed Jan 23, 2025
1 parent 4c68ea4 commit 102fd0e
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/actions/build_squashfs_image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,19 @@ runs:
path: dist

- name: set temporary variables
id: set-vars
shell: bash
run: |
export DOCKER_IMAGE=otaclient-${{ inputs.platform_suffix }}:${{ inputs.version }}
export DOCKER_CONTAINER=otaclient-${{ inputs.platform_suffix }}_v${{ inputs.version }}
export SQUASHFS=otaclient-${{ inputs.platform_suffix }}_v${{ inputs.version }}.squashfs
echo "DOCKER_IMAGE=your-docker-image-name" >> $GITHUB_ENV
echo "DOCKER_CONTAINER=otaclient-${{ inputs.platform_suffix }}_v${{ inputs.version }}" >> $GITHUB_ENV
echo "SQUASHFS=otaclient-${{ inputs.platform_suffix }}_v${{ inputs.version }}.squashfs" >> $GITHUB_ENV
- name: debug
shell: bash
run: |
echo $DOCKER_IMAGE
echo $DOCKER_CONTAINER
echo $SQUASHFS
- name: build docker image
shell: bash
Expand All @@ -42,17 +50,17 @@ runs:
--build-arg=UBUNTU_BASE=${{ inputs.base_image }} \
--build-arg=OTACLIENT_VERSION=${{ inputs.version }} \
--build-arg=OTACLIENT_WHL=${{ inputs.whl }} \
-t ${{ env.DOCKER_IMAGE }} \
-t ${DOCKER_IMAGE} \
--output type=docker \
.
popd
rm docker/app_img/${{ env.OTACLIENT_WHL }}
rm docker/app_img/${{ inputs.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 }} \
docker create --name ${DOCKER_CONTAINER} ${DOCKER_IMAGE}
docker export ${DOCKER_CONTAINER} | mksquashfs - ${SQUASHFS} \
-tar -b 1M \
-mkfs-time 1729810800 \
-all-time 1729810800 \
Expand All @@ -61,4 +69,4 @@ runs:
-progress \
-comp zstd \
-Xcompression-level 22
mv ${{ env.SQUASHFS }} dist/
mv ${SQUASHFS} dist/

0 comments on commit 102fd0e

Please sign in to comment.