File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync to CNB
2+ on :
3+ push :
4+ branches : [ master ] # 指定在推送到master分支时触发
5+
6+ jobs :
7+ sync :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout code
11+ uses : actions/checkout@v3
12+
13+ - name : Configure Git and Push to CNB
14+ run : |
15+ git remote add cnb https://${{ secrets.CNB_USERNAME }}:${{ secrets.CNB_TOKEN }}@cnb.cool/aLinChe/Linux-minimal.git
16+ git push cnb master:master --force
Original file line number Diff line number Diff line change 3232* .app
3333
3434. *
35+ ! /.github /**
3536/build
3637mnt
3738rootfs /*
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ $(TARGET): $(OBJS)
6868
6969MAKEFLAGS += --no-print-directory
7070
71- .PHONY : default build user initramfs
71+ .PHONY : default build user initramfs make_diskimage
7272.PHONY : run run-nographic run-bridge debug
7373.PHONY : clean info help
7474
@@ -96,6 +96,9 @@ initramfs: $(TARGET)
9696 > ../$(BUILD_DIR ) /initramfs.cpio.gz
9797 @echo " ===== initramfs 已成功生成至 $( BUILD_DIR) /initramfs.cpio.gz ====="
9898
99+ make_diskimage : build
100+ sh -c " bash ./tools/run-qemu.sh --arch $( ARCH) --make_diskimage"
101+
99102run :
100103 sh -c " bash ./tools/run-qemu.sh --arch $( ARCH) --display window --bios uefi --ext4"
101104
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ QEMU_NOGRAPHIC=false
1515BIOS_TYPE=" "
1616TAP_DEV=" tap0"
1717
18+ ONLYMAKEIMAGE=false
19+
1820while true ; do
1921 case " $1 " in
2022 --arch)
@@ -89,6 +91,10 @@ while true; do
8991 fi
9092 APPEND_PARAMS+=" ${CMDLINE} "
9193 shift 1;;
94+ --make_diskimage)
95+ ONLYMAKEIMAGE=true
96+ shift 1
97+ break ;;
9298 * ) break
9399 esac
94100done
@@ -291,4 +297,10 @@ main() {
291297 run_qemu
292298}
293299
300+ if [ ${ONLYMAKEIMAGE} == true ]; then
301+ prepare_disk_image
302+ write_disk_image
303+ exit 0
304+ fi
305+
294306main
You can’t perform that action at this time.
0 commit comments