Skip to content

Commit

Permalink
Add compression function
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Jan 8, 2022
1 parent 6f3e195 commit 1ad86ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rebuild-armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
armbian_url="${{ github.event.inputs.armbian_url }}"
if [[ -z "${armbian_url}" ]]; then
armbian_site="https://armbian.tnahosting.net/dl/lepotato/archive/"
armbian_name="Armbian.*bullseye.*.img.xz"
armbian_name="Armbian.*focal.*.img.xz"
armbian_file=$(curl -s "${armbian_site}" | grep -oE "${armbian_name}" | head -n 1)
if [ -n "${armbian_file}" ]; then
armbian_url="${armbian_site}/${armbian_file}"
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ runs:
sync
echo -e "About the ${armbian_filepath} directory: \n $(ls ${armbian_filepath} -l 2>/dev/null)"
cd ${armbian_filepath}
cd ${GITHUB_ACTION_PATH}/${armbian_filepath}
echo -e "Check the armbian file format..."
down_file="$(ls . -l 2>/dev/null | grep "^-" | awk '{print $9}' | head -n 1)"
[ -z "${down_file}" ] && echo -e "The [ ${armbian_file} ] is invalid." && exit 1
Expand All @@ -76,6 +76,10 @@ runs:
sudo chmod +x rebuild
sudo ./rebuild ${make_command}
cd ${GITHUB_ACTION_PATH}/${armbian_filepath}
echo -e "Compress the .img file in the [ ${armbian_filepath} ] directory. \n"
sudo gzip *.img && sync
cd ${GITHUB_ACTION_PATH}
echo -e "Output environment variables."
echo "PACKAGED_OUTPUTPATH=${PWD}/${armbian_filepath}" >> $GITHUB_ENV
Expand Down

0 comments on commit 1ad86ee

Please sign in to comment.