8000 使用 GitHub Action 自动化任务 by zctmdc · Pull Request #1 · zctmdc/ipxefm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

使用 GitHub Action 自动化任务 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ������������ã�
# 1. ���ύ `main` ��֧ʱ
# 2. ���������� `zip` �� `7z` �ļ�
# 3. ������`github release`��,tag �� UserBuild_yyyy-mm-dd_HH-MM_${branch} ����

name: Publish Release Zip and 7Z

on:
pull_request:
branches:
- main

push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}

- name: zip
# ʹ��zipѹ�����ų�.git��.githubĿ¼
run: zip -r ipxefm.zip * -x "*.git*" "*.github*"

- name: 7z
# ʹ��7zѹ�����ų�.git��.githubĿ¼
run: 7z a -t7z -r ipxefm.7z * -xr!*.git* -xr!*.github* -xr!ipxefm.zip -xr!ipxefm.7z
- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::UserBuild_$(date +"%Y.%m.%d_%H-%M")_${{ github.ref_name }}"

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
ipxefm.7z
ipxefm.zip
body: |
- ����ʱ�䣺${{ github.event.head_commit.timestamp }}
- �����ߣ�${{ github.event.head_commit.author.name }}
- ������֧��${{ github.ref_name }}
- ������Ϣ��${{ github.event.head_commit.message }}

- You can download the complete `ipxefm.7z` package from **Tencent QQ group** `146859089`, which contains the demo `mini.wim` (edited)
- ���Դ�**��ѶQQȺ**`146859089`����������`ipxefm.7z`�������������ʾ��`mini.wim`
tag_name: ${{ steps.tag.outputs.release_tag }}
31 changes: 31 additions & 0 deletions .github/workflows/sync-gitee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ������������ã�
# 1. ���ύ `main` ��֧ʱ
# 2. ͬ�� gitee
name: Sync Gitee

on: [push, delete]

jobs:
mirror_to_gitee:
runs-on: ubuntu-latest
steps:
- name: check_gitee_token
run: |
if [ -z "${{ secrets.GITEE_USER_NAME }}" ] || [ -z "${{ secrets.GITEE_RSA_PRIVATE_KEY }}" ]; then
echo "Error: GITEE_USER_NAME or GITEE_RSA_PRIVATE_KEY is not set."
echo see https://github.com/pixta-dev/repository-mirroring-action for help.
echo �� https://zhuanlan.zhihu.com/p/353862378 , �鿴 "Gitee �� Github ���ӹ�Կ" "3.Github�ֿ�����˽Կ"
echo �� https://gitee.com/profile/sshkeys �� ����GITEE��Կ
echo �� https://github.com/<YOUR_USERNAME>/ipxefm/settings/secrets/actions �� ���� GITEE_USER_NAME �� GITEE_RSA_PRIVATE_KEY
exit 1
fi


- name: "Checkout"
uses: actions/checkout@v1

- name: "Mirror to gitee"
uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: git@gitee.com:${{secrets.GITEE_USER_NAME}}/ipxefm.git
ssh_private_key: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// Use GB 2312
"files.encoding": "gb2312",
"files.eol": "\r\n",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.autoGuessEncoding": true,
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
}
44 changes: 22 additions & 22 deletions Boot/ipxefm/init.ipxe
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set vhdbootfile-default 1
set iqnbootfile-default 1
set ramosbootfile-default 1
#设置wim启动默认方式
set pcbioswimbootmode wimboot #(不注入文件)
set pcbioswimbootmode wimboot #(不注入文件)
#set pcbioswimbootmode startup.bat #(注入默认的startup.bat文件)
set efiwimbootmode wimboot
#set efiwimbootmode startup.bat #(注入默认的startup.bat文件)
Expand All @@ -25,9 +25,9 @@ set pcbiosisobootmode pcbiosisowithmemdisk #其它方式有isowithgrub isowithme
set efiisobootmode efiisowithimgboot #其它方式有efiisowithgrubmemrt efiisowithimgboot efiisowithgrub efiisowithsanboot

#设置img启动默认方式
set pcbiosimgbootmode memdiskimg #其它方式有pcbiossanbootimg pcbiosbootimgfdd pcbiosbootimghdd imgwithimgboot memdiskimg
set pcbiosimgbootmode memdiskimg #其它方式有pcbiossanbootimg pcbiosbootimgfdd pcbiosbootimghdd imgwithimgboot memdiskimg
set efiimgbootmode efibootimg #方式有其它efisanbootimg efibootimg

#设置vhd启动默认方式
set pcbiosvhdbootmode ${platform}sanbootvhd
set efivhdbootmode ${platform}sanbootvhd
Expand All @@ -42,15 +42,15 @@ set efiramosbootmode ${platform}ramos
#设置第一个菜单的超时时间
set ext-timeout 8000
#设置第二个选择文件界面菜单的超时时间
set bootfile-timeout 8000
set bootfile-timeout 8000
##############高级秃顶用户修改区域结束######

################系统设置开始####################
#设置分辨率图片
isset ${x} || set x 800
isset ${y} || set y 600
isset ${bg} || set bg 800x600.png
isset ${ld} || set ld loading.png
#设置分辨率图片
isset ${x} || set x 800
isset ${y} || set y 600
isset ${bg} || set bg 800x600.png
isset ${ld} || set ld loading.png
#这句脚本是读取本地文件用,不用管
ifopen net0
#同上
Expand All @@ -67,7 +67,7 @@ isset ${proxydhcp/next-server} && set booturl ${proxydhcp/next-server} || set bo
#备用 prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE command line... && shell ||

#设置永久环境变量
#修改booturl的地址(默认是自动获取,要生效就去掉#号)
#修改booturl的地址(默认是自动获取,要生效就去掉#号)
#set booturl 169.254.1.1:8080
#没有设置iscsiurl就设置为booturl
isset ${iscsiurl} || set iscsiurl ${booturl}
Expand All @@ -83,8 +83,8 @@ console --picture ${themes}/${bg} --left 32 --right 32 --top 32 --bottom 48 ||
#主菜单
:bootmenu
menu iPXE's Boot Menu BootServer:http://${booturl} QQGroup(Qun):146859089
item --gap -- Choose BootFile

item --gap -- Choose BootFile
item --key 1 wim 1. Boot Wimfile
item --key 2 iso 2. Boot Isofile
item --key 3 img 3. Boot Imgfile
Expand All @@ -96,15 +96,15 @@ console --picture ${themes}/${bg} --left 32 --right 32 --top 32 --bottom 48 ||
item --gap -- Cloud Boot
item RyanBoot RyanBoot
item netboot.xyz.${platform} netboot.xyz
item --gap -- Advanced options

item --gap -- Advanced options
item --key l reload L. Reload iPXE Menu
item --key c config C. Configure settings
item --key c config C. Configure settings
item --key s shell S. Drop to iPXE shell
item --key r reboot R. Reboot computer
item --key p poweroff P. Poweroff computer
item --key x bootlocal X. Exit iPXE and continue BIOS boot
item ratio Resolution ratio [1920x1080 1024x768 800x600]
item --key x bootlocal X. Exit iPXE and continue BIOS boot
item ratio Resolution ratio [1920x1080 1024x768 800x600]
choose --timeout ${ext-timeout} --default ${ext-default} selected ||
set ext ${selected} ||
iseq ${selected} config && config ||
Expand All @@ -116,7 +116,7 @@ iseq ${selected} ratio && goto ratio ||
iseq ${selected} RyanBoot && chain --autofree http://hkkitlee.ddns.net:8999/chain.ipxe ||
iseq ${selected} netboot.xyz.pcbios && chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn ||
iseq ${selected} netboot.xyz.efi && chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.efi ||
iseq ${selected} burn && chain ${prefix}/types/burn ||
iseq ${selected} burn && chain ${prefix}/types/burn.ipxe ||
iseq ${selected} reload && chain http://${booturl}${scriptfile} ||


Expand All @@ -140,7 +140,7 @@ isset ${${ext}ename} && set titlee ${${ext}cname} || set titlee ${${ext}e}
isset ${${ext}fname} && set titlef ${${ext}dname} || set titlef ${${ext}f}
isset ${${ext}gname} && set titleg ${${ext}dname} || set titleg ${${ext}g}
menu Boot:${ext}file BootServer:http://${booturl} QQGroup(Qun):146859089
item --gap -- Choose ${ext}file
item --gap -- Choose ${ext}file
item --key 1 ${ext}1 1. ${title1}
item --key 2 ${ext}2 2. ${title2}
item --key 3 ${ext}3 3. ${title3}
Expand All @@ -164,11 +164,11 @@ menu Boot:${ext}file BootServer:http://${booturl} QQGroup(Qun):146859089
set sel ${selected} ||
set bootfile ${${sel}} ||
iseq ${selected} menu && goto bootmenu ||
chain ${prefix}/types/${ext} ||
chain ${prefix}/types/${ext}.ipxe ||
goto ${ext} ||
chain ${prefix}/init.ipxe ||


#分辨率调整
:ratio
menu Boot:${ext}file BootServer:http://${booturl} QQGroup(Qun):146859089
Expand All @@ -194,4 +194,4 @@ boot ||
chain ${prefix}/init.ipxe ||

:biosbootlocal
exit
exit
6 changes: 3 additions & 3 deletions Boot/ipxefm/rules/burn.ipxe
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!ipxe
##################�߼�����burnimg##################
##################�߼�����burnimg##################
iseq ${quiet} 1 && console --x ${x} -y ${y} && cpair --foreground 0 0 || #��Ĭ����
:burn
echo Burn ${img}........................
kernel ${burnpath}${kernel} showmounts toram root=/dev/nfs initrd=${initrd} netboot=nfs nfsroot=${nfsroot} share=${share} img=${img} ip=dhcp ipv6.disable=1 ro splash biosdevname=0 ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd ${burnpath}${initrd} ||
boot || chain ${prefix}/types/${ext}
##################�߼�����##################
boot || chain ${prefix}/types/${ext}.ipxe
##################�߼�����##################
12 changes: 6 additions & 6 deletions Boot/ipxefm/rules/disk.ipxe
10000
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ goto ${bootmode}
:efiisowithimgboot
initrd -n boot.iso http://${booturl}${bootfile} ||
chain http://${booturl}/app/${platform}/imgboot.efi ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

:pcbiosbootimg
kernel http://${booturl}/app/${platform}/grub.exe ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd http://${booturl}${bootfile} ||
initrd http://${booturl}/app/${platform}/512 ||
imgargs grub.exe --config-file="map (rd)+1 (${diskmode}0);map --hook; root (${diskmode}0);chainloader (${diskmode}0)+1;boot" ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

:efibootimg
kernel http://${booturl}/app/wimboot/wimboot gui ||
initrd -n bootmgfw.efi http://${booturl}/app/${platform}/grub4uefi.efi ||
initrd -n menu.lst http://${booturl}/app/${platform}/menu.lst ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd -n boot.iso http://${booturl}${bootfile} ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

#��memdisk������img(��legacybios)
:memdiskimg
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd http://${booturl}${bootfile} ||
kernel ${boot-url}/app/${platform}/memdisk ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

#����img����
:pcbiosbootvhd
Expand All @@ -36,12 +36,12 @@ cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --l
initrd http://${booturl}${bootfile} ||
initrd http://${booturl}/app/${platform}/512 ||
imgargs grub.exe --config-file="map (rd)+1 (hd0);map --hook;chainloader (hd0);boot" ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

:efibootvhd
kernel http://${booturl}/app/wimboot/wimboot gui ||
initrd -n bootmgfw.efi http://${booturl}/app/${platform}/grubfmx64.efi ||
initrd -n menu.lst http://${booturl}/app/${platform}/menu.lst ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd -n boot.iso http://${booturl}${bootfile} ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe
10 changes: 5 additions & 5 deletions Boot/ipxefm/rules/iso.ipxe
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ goto ${bootmode} ||
kernel ${boot-url}/app/${platform}/memdisk iso raw ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd http://${booturl}${bootfile} ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe
#����iso����

:pcbiosisowithgrub
Expand All @@ -16,7 +16,7 @@ cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --l
initrd http://${booturl}${bootfile} ||
initrd http://${booturl}/app/${platform}/512 ||
imgargs grub.exe --config-file="map (rd)+1 (0xff);map --hook;chainloader (255);boot" ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

iseq ${selected} menu && chain ${prefix}/init.ipxe ||
:efiisowithgrub
Expand All @@ -25,18 +25,18 @@ initrd -n mapiso http://${booturl}/ ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd -n boot.iso http://${booturl}${bootfile} ||
initrd -n bootx64.efi http://${booturl}/app/${platform}/grub2toy.efi ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

:efiisowithgrubmemrt #�����ڰ�װ��svbus������pe�����iso
kernel http://${booturl}/app/wimboot/wimboot gui ||
initrd -n mapisomemrt http://${booturl}/ ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd -n boot.iso http://${booturl}${bootfile} ||
initrd -n bootx64.efi http://${booturl}/app/${platform}/grub2toy.efi ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

:efiisowithimgboot
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd -n boot.iso http://${booturl}${bootfile} ||
chain http://${booturl}/app/${platform}/imgboot.efi ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe
4 changes: 2 additions & 2 deletions Boot/ipxefm/rules/ramos.ipxe
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ initrd -n mapramosmem http://${booturl}/ ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd -n boot.ramos http://${booturl}${bootfile} ||
initrd -n bootx64.efi http://${booturl}/app/${platform}/grub2toy.efi ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe

:pcbiosramosg4d
kernel http://${booturl}/app/${platform}/grub.exe ||
cpair --foreground 2 0 && console --x ${x} -y ${y} --picture ${themes}/${ld} --left 32 --right 32 --top 32 --bottom 48 || #loading
initrd http://${booturl}${bootfile} ||
initrd http://${booturl}/app/${platform}/512 ||
imgargs grub.exe --config-file="map --mem --top (rd)+1 (hd0);map (hd0) (hd1);map --hook;root (hd0,0);chainloader /bootmgr;" ||
boot || chain ${prefix}/types/${ext}
boot || chain ${prefix}/types/${ext}.ipxe
34 changes: 17 additions & 17 deletions Boot/ipxefm/types/burn → Boot/ipxefm/types/burn.ipxe
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!ipxe
#ϵͳ����#
set burnpath http://${booturl}/ctos/boot/ #kernel��initrd�����ļ�����·��
set kernel vmlinuz-4.13.0-11-generic #kernel����
set initrd initrd.img-4.13.0-11-generic #initrd����
set share //${booturl}/images #SMB����Ŀ¼����Ŀ¼������img����
set nfsroot ${booturl}:/S/ipxefm/ctos #ע���Сд
#ϵͳ���ý���#
#burn���߲˵�
menu iPXE's Boot Menu boot:${bootfile} QQGroup(Qun):146859089
item --gap -- ------------------------${platform} boot:${bootfile} -----------------------------
item --key 1 CTOS_STD_x64_20180426.img 1. Burn CTOS_STD_x64_20180426.img
item --key 2 CTOS_STD_x64_20210101.img 2. Burn CTOS_STD_x64_20210101.img
item --key 3 lede.img 3. Burn lede.img
item --key m menu M. back to menu
choose --timeout 80000000 --default 20180426 selected #����ʱ�Զ�ѡ��˵������գ�
set img ${selected} && chain ${prefix}/rules/burn.ipxe ||
#!ipxe
#ϵͳ����#
set burnpath http://${booturl}/ctos/boot/ #kernel��initrd�����ļ�����·��
set kernel vmlinuz-4.13.0-11-generic #kernel����
set initrd initrd.img-4.13.0-11-generic #initrd����
set share //${booturl}/images #SMB����Ŀ¼����Ŀ¼������img����
set nfsroot ${booturl}:/S/ipxefm/ctos #ע���Сд
#ϵͳ���ý���#
#burn���߲˵�
menu iPXE's Boot Menu boot:${bootfile} QQGroup(Qun):146859089
item --gap -- ------------------------${platform} boot:${bootfile} -----------------------------
item --key 1 CTOS_STD_x64_20180426.img 1. Burn CTOS_STD_x64_20180426.img
item --key 2 CTOS_STD_x64_20210101.img 2. Burn CTOS_STD_x64_20210101.img
item --key 3 lede.img 3. Burn lede.img
item --key m menu M. back to menu
choose --timeout 80000000 --default 20180426 selected #����ʱ�Զ�ѡ��˵������գ�
set img ${selected} && chain ${prefix}/rules/burn.ipxe ||
chain ${prefix}/init.ipxe ||
Loading
0