Bump for upstream #103
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
# This is a basic workflow to help you get started with Actions | |
name: Build Images | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# Runs a set of commands using the runners shell | |
- name: Run a multi-line script | |
run: | | |
curl -s https://api.github.com/repos/ventoy/Ventoy/releases/latest | grep browser_download_url.*linux.tar.gz | cut -d : -f 2,3 | tr -d \" | wget -qi - | |
tar -xf ventoy-* | |
rm *.gz | |
cd ventoy-* | |
dd if=/dev/zero of=/tmp/256MBwLiveCD.img bs=512 count=491520 | |
sudo losetup -fP /tmp/256MBwLiveCD.img | |
sudo yes | sudo ./Ventoy2Disk.sh -I /dev/loop3 | |
cd .. | |
sudo mkdosfs -F 32 /dev/loop3p1 -n VENTOY | |
sudo mkdir /mnt/loop | |
sudo mount /dev/loop3p1 /mnt/loop | |
sudo chmod 777 /mnt/loop | |
sudo mkdir /mnt/loop/ventoy | |
sudo cp ventoy.json /mnt/loop/ventoy | |
sudo umount /mnt/loop | |
sudo losetup -d /dev/loop3 | |
cp /tmp/256MBwLiveCD.img /tmp/256MBempty.img | |
echo two images made | |
curl -s https://api.github.com/repos/ventoy/Ventoy/releases/latest | tee | grep browser_download_url.*iso | tee | cut -d : -f 2,3 | tee | tr -d \" | tee | sudo wget -qi - | |
echo rebuilding iso into zip. | |
sudo mkdir /mnt/iso | |
sudo chmod 777 /mnt/iso | |
sudo mount -o loop ventoy*.iso /mnt/iso | |
mkdir /tmp/iso | |
cp -fr $GITHUB_WORKSPACE/vtoyefi/* /tmp/iso | |
cp /mnt/iso/EFI/boot/vmlinuz /tmp/iso/EFI/boot/ | |
cp /mnt/iso/EFI/boot/initrd /tmp/iso/EFI/boot/ | |
cp /mnt/iso/EFI/VentoyLiveCD /tmp/iso/EFI/ | |
sudo umount /mnt/iso | |
rm ventoy*.iso | |
cd /tmp/iso | |
zip -r /tmp/fat32usb.zip * | |
cd /tmp | |
zip -r 256MBempty.img.zip 256MBempty.img | |
rm /tmp/256MBempty.img | |
ls /tmp | |
df -h | |
echo 256 megabyte complete | |
cd $GITHUB_WORKSPACE | |
cd ventoy-* | |
dd if=/dev/zero of=/tmp/1024MBempty.img bs=512 count=1966080 | |
sudo losetup -fP /tmp/1024MBempty.img | |
sudo yes | sudo ./Ventoy2Disk.sh -I /dev/loop3 | |
cd .. | |
sudo mkdosfs -F 32 /dev/loop3p1 -n VENTOY | |
sudo mount /dev/loop3p1 /mnt/loop | |
sudo chmod 777 /mnt/loop | |
sudo mkdir /mnt/loop/ventoy | |
sudo cp ventoy.json /mnt/loop/ventoy | |
sudo umount /mnt/loop | |
sudo losetup -d /dev/loop3 | |
cd /tmp | |
zip -r 1024MBempty.img.zip 1024MBempty.img | |
echo 1024 megabyte complete | |
cd $GITHUB_WORKSPACE | |
cd ventoy-* | |
dd if=/dev/zero of=/tmp/4096MBempty.img bs=512 count=7864320 | |
sudo losetup -fP /tmp/4096MBempty.img | |
sudo yes | sudo ./Ventoy2Disk.sh -I /dev/loop3 | |
cd .. | |
sudo mkdosfs -F 32 /dev/loop3p1 -n VENTOY | |
sudo mount /dev/loop3p1 /mnt/loop | |
sudo chmod 777 /mnt/loop | |
sudo mkdir /mnt/loop/ventoy | |
sudo cp ventoy.json /mnt/loop/ventoy | |
sudo umount /mnt/loop | |
sudo losetup -d /dev/loop3 | |
cd /tmp | |
zip -r 4096MBempty.img.zip 4096MBempty.img | |
echo 4096 megabyte complete | |
cd $GITHUB_WORKSPACE | |
cd ventoy-* | |
sudo chmod +x $GITHUB_WORKSPACE/ventoy-*/tool/x86_64/mount.exfat-fuse | |
dd if=/dev/zero of=/tmp/8192MBempty.img bs=512 count=15728640 | |
sudo losetup -fP /tmp/8192MBempty.img | |
sudo yes | sudo ./Ventoy2Disk.sh -I /dev/loop3 | |
cd .. | |
sudo $GITHUB_WORKSPACE/ventoy-*/tool/x86_64/mount.exfat-fuse /dev/loop3p1 /mnt/loop | |
sudo chmod 777 /mnt/loop | |
sudo mkdir /mnt/loop/ventoy | |
sudo cp ventoy.json /mnt/loop/ventoy | |
sudo umount /mnt/loop | |
sudo losetup -d /dev/loop3 | |
cd /tmp | |
zip -r 8192MBempty.img.zip 8192MBempty.img | |
echo 8192 megabyte complete enjoy | |
- name: Create release | |
id: create-new-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.run_number }} | |
release_name: Build ${{ github.run_number }} | |
- name: Upload 0256MBempty to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-new-release.outputs.upload_url }} | |
asset_path: /tmp/256MBempty.img.zip | |
asset_name: 0256MBempty_build${{ github.run_number }}.img.zip | |
asset_content_type: application/octet-stream | |
- name: Upload 1024MBempty to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-new-release.outputs.upload_url }} | |
asset_path: /tmp/1024MBempty.img.zip | |
asset_name: 1024MBempty_build${{ github.run_number }}.img.zip | |
asset_content_type: application/octet-stream | |
- name: Upload 4096MBempty to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-new-release.outputs.upload_url }} | |
asset_path: /tmp/4096MBempty.img.zip | |
asset_name: 4096MBempty_build${{ github.run_number }}.img.zip | |
asset_content_type: application/octet-stream | |
- name: Upload 8192MBempty to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-new-release.outputs.upload_url }} | |
asset_path: /tmp/8192MBempty.img.zip | |
asset_name: 8192MBempty_build${{ github.run_number }}.img.zip | |
asset_content_type: application/octet-stream | |
- name: Upload fat32usb.zip to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-new-release.outputs.upload_url }} | |
asset_path: /tmp/fat32usb.zip | |
asset_name: fat32usb_build${{ github.run_number }}.zip | |
asset_content_type: application/octet-stream | |