-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
52 additions
and
14 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,43 @@ | ||
name: Build image | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build_image: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Upgrade packages and install required software | ||
run: | | ||
sudo apt update | ||
sudo apt -y upgrade | ||
sudo apt -y install qemu-utils grub-pc | ||
- name: Set version | ||
run: echo "ver=$(git log -1 --pretty=format:"%h")" >> "$GITHUB_ENV" | ||
|
||
- name: Linux Release | ||
run: git archive --prefix=MultiOS-USB_$ver/ -o MultiOS-USB_linux_$ver.tar.gz $ver | ||
|
||
- name: Windows Release | ||
run: | | ||
image_name="image.img" | ||
image_size="54542848" | ||
qemu-img create -f raw $image_name $image_size | ||
dev=$(sudo losetup -f -P --show $image_name) | ||
sed -i -e '170s/^/# /; 173s/^/# /; 183s/^/# /; 200s/^/# /; 225,226s/^/# /' installer.sh | ||
echo "YeS" | sudo ./installer.sh $dev | ||
sudo losetup -d $dev | ||
(cd part_data && sudo zip -r ../files.zip *) | ||
mv docs/README_image README | ||
sudo zip MultiOS-USB_windows_image_$ver.zip $image_name files.zip README | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: MultiOS-USB_images_${{ env.ver }} | ||
path: | | ||
MultiOS-USB_windows_image_*.zip | ||
MultiOS-USB_linux_*.tar.gz |
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