-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (55 loc) · 1.88 KB
/
build.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
63
64
65
name: Compile and release
on:
push:
tags:
- '*'
jobs:
build:
# Only publish on tags. run git tag vX and git push origin vX
runs-on: panda-arc
permissions:
contents: write
steps:
- name: Install git
run: sudo apt-get -qq update -y && sudo apt-get -qq install git -y
- uses: actions/checkout@v4 # Clones to $GITHUB_WORKSPACE. NOTE: this requires git > 2.18 (not on ubuntu 18.04 by default) to get .git directory and submodules
with:
fetch-depth: 0
#submodules: 'true'
# Instead of getting submodules with checkout, we can do it manually to control depth.
# We don't want a full Linux history
- name: Pull kernel source
run: git submodule update --init --depth 1
- name: Build Container
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: pandare/kernel_builder:latest
- name: Build Kernel
run: docker run --rm -v $PWD:/app pandare/kernel_builder /app/_in_container_build.sh
- name: Save package
uses: actions/upload-artifact@v3
with:
name: kernels-latest.tar.gz
path: kernels-latest.tar.gz
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release_${{ github.sha }}
release_name: Release ${{ github.ref }}
body: |
Release @${{ github.ref }}
draft: true
prerelease: false
- name: Publish release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: kernels-latest.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}