.github/workflows: Remove telegram message #128
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: | |
push: | |
branches: | |
- Grass | |
pull_request: | |
branches: | |
- Grass | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
device: [a51, m31s, f41, m31, m21] | |
rom: [aosp, oneui] | |
ksu: ['', '--no-ksu'] # Empty string for KSU, --no-ksu for non-KSU | |
name: "🚧 Build ${{matrix.device}} ${{matrix.rom}} ${{matrix.ksu == '' && 'KSU' || 'NoKSU'}}" | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
bison \ | |
flex \ | |
libssl-dev \ | |
python3 \ | |
python-is-python3 \ | |
libarchive-tools | |
- name: Setup toolchain | |
run: | | |
mkdir -p toolchain | |
cd toolchain | |
echo 'Downloading antman and syncing...' | |
bash <(curl -s "https://raw.githubusercontent.com/Neutron-Toolchains/antman/main/antman") -S=05012024 | |
echo 'Patching for glibc...' | |
bash <(curl -s "https://raw.githubusercontent.com/Neutron-Toolchains/antman/main/antman") --patch=glibc | |
echo 'Toolchain setup completed' | |
- name: Build kernel | |
run: | | |
python build_kernel.py --target=${{matrix.device}} --${{matrix.rom}} ${{matrix.ksu}} | |
- name: Check build artifacts | |
id: check_files | |
run: | | |
if ls Grass*.zip 1> /dev/null 2>&1; then | |
echo "zip_exists=true" >> $GITHUB_OUTPUT | |
else | |
echo "zip_exists=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Upload build to Telegram | |
if: steps.check_files.outputs.zip_exists == 'true' | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_CHAT_ID }} | |
token: ${{ secrets.TELEGRAM_BOT_KEY }} | |
document: ./Grass*.zip |