-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.38 KB
/
构建.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: 构建
on:
push:
branches: [ "main" ]
paths:
- '.github/workflows/构建.yml'
- 'cmdpath/**'
- 'grub-mkimage/**'
- 'memdisk/**'
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/构建.yml'
- 'cmdpath/**'
- 'grub-mkimage/**'
- 'memdisk/**'
jobs:
build:
strategy:
matrix:
type: [grub2-ventoy-vdisk]
name: 构建 ${{ matrix.type }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 合成 mendisk
working-directory: memdisk
run: sudo bash ./package.sh
- name: 克隆 grub2
run: |
git clone https://github.com/M-L-P/grub2.git
cd grub2
ls -l
- name: 合成 ${{ matrix.type }}.efi
run: |
chmod -R 777 grub2
cd grub2
mkdir ${{ matrix.type }}
ls -l
cp ../grub-mkimage/* ./${{ matrix.type }}
cp ../memdisk/${{ matrix.type }}.xz ./${{ matrix.type }}
cd ${{ matrix.type }}
ls -l
sudo bash ./${{ matrix.type }}.sh
- name: 归档 ${{ matrix.type }}
run: |
mkdir -p ESP/EFI/ventoy
cp ./grub2/${{ matrix.type }}/${{ matrix.type }}.efi ESP/EFI/ventoy
cp ./cmdpath/* ESP/EFI/ventoy
- name: 上传到此处
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.type }}
path: ESP