forked from LinuxKernelBuilder/kernel-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (58 loc) · 2.22 KB
/
Copy pathbuild.yml
File metadata and controls
64 lines (58 loc) · 2.22 KB
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
63
64
name: Build kernel deb packages
on:
push:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 5,17 * * *'
jobs:
build:
name: Build kernel
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
# 这个值是保留给系统的空间大小,之前设置太小,总会在安装依赖或者编译过程中报设备空间不足的错误而导致编译失败
root-reserve-mb: 4096
swap-size-mb: 512
remove-dotnet: 'true'
remove-android: 'true'
- name: Checkout
uses: actions/checkout@main
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: install dep
run: |
sudo apt-get update
sudo apt-get install -y curl jq gpg python3-pyquery wget xz-utils make gcc flex bison dpkg-dev bc rsync kmod cpio libssl-dev git lsb vim libelf-dev neofetch python3-pip python3-tk debhelper
- name: Build
run: bash build_action.sh
- name: Artifact
uses: actions/upload-artifact@v3
with:
name: artifact
path: ${{ github.workspace }}/artifact/
- name: Compare files
id: compare
run: |
cmp --silent txt/longterm.txt /tmp/longterm.txt && cmp --silent txt/mainline.txt /tmp/mainline.txt && cmp --silent txt/stable.txt /tmp/stable.txt && echo "skip=true" >> $GITHUB_OUTPUT || echo "skip=false" >> $GITHUB_OUTPUT
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
if: ${{ steps.compare.outputs.skip != 'true' }}
run: |
git config user.name "XXTXTOP"
git config user.email "xxtxtop@gmail.com"
ls -al
pwd
cp /tmp/mainline.txt txt/mainline.txt
cp /tmp/mainlineurl.txt txt/mainlineurl.txt
cp /tmp/stable.txt txt/stable.txt
cp /tmp/stableurl.txt txt/stableurl.txt
cp /tmp/longterm.txt txt/longterm.txt
cp /tmp/longtermurl.txt txt/longtermurl.txt
git pull
git add txt/
git commit -m "Create file with kernel version"
git push