Build Kernel #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Kernel | |
on: | |
workflow_dispatch: | |
inputs: | |
DEVICE_NAME: | |
description: 'Your device codename.' | |
required: true | |
default: '' | |
ANDROID_VERSION: | |
description: 'Your android version.' | |
required: true | |
default: '' | |
type: choice | |
options: | |
- t-oss | |
- s-oss | |
- r-oss | |
- q-oss | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Start Building Kernel | |
run: | | |
export KBUILD_BUILD_USER="${{ github.actor }}" | |
export KBUILD_BUILD_HOST="${{ github.event.inputs.DEVICE_NAME }}" | |
./build | |
- name: Set Properties | |
id: props | |
run: | | |
echo "date=$(TZ=Asia/Manila date +%Y%m%d-%I%M%p)" >> $GITHUB_OUTPUT | |
- name: Compressed as Archive | |
run: | | |
cd /home/runner/work/myKernel/out/arch/arm64/boot || exit 1 | |
zip -r9 "${{ github.event.inputs.DEVICE_NAME }}-${{ steps.props.outputs.date }}.zip" ./* -x "dts" -x "dts/*" | |
- name: Release | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: | | |
/home/runner/work/myKernel/out/arch/arm64/boot/*.zip | |
/home/runner/work/myKernel/build.log | |
name: Compiled Kernel for ${{ github.event.inputs.DEVICE_NAME }} - ${{ steps.props.outputs.date }} | |
draft: false | |
prerelease: false | |
tag: ${{ github.run_id }}-${{ steps.props.outputs.date }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
body: | | |
## Notes | |
- Extract ${{ github.event.inputs.DEVICE_NAME }}-${{ steps.props.outputs.date }}.zip, look your newly-compiled kernel inside. | |
- Include building logs. | |
- name: Link of Release | |
run: | | |
echo "Enjoy your Newly Built Kernel" | |
echo "https://github.com/${GITHUB_REPOSITORY}/releases/tag/${{ github.run_id }}-${{ steps.props.outputs.date }}" |