71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
name: Build Kernel - AVD
|
|
on:
|
|
push:
|
|
branches: ["main", "ci", "checkci"]
|
|
paths:
|
|
- ".github/workflows/build-kernel-avd.yml"
|
|
- ".github/workflows/avd-kernel.yml"
|
|
- ".github/workflows/manifests/*xml"
|
|
- "kernel/**"
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/build-kernel-avd.yml"
|
|
- ".github/workflows/avd-kernel.yml"
|
|
- ".github/workflows/manifests/*.xml"
|
|
- "kernel/**"
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
inputs:
|
|
upload:
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
description: "Whether to upload to branch"
|
|
jobs:
|
|
build-kernel:
|
|
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
|
|
uses: ./.github/workflows/avd-kernel.yml
|
|
secrets: inherit
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- version: "android-14-avd_x86_64"
|
|
manifest: "android-14-avd_x86_64.xml"
|
|
arch: "x86_64"
|
|
- version: "android-15-avd_aarch64"
|
|
manifest: "android-15-avd_aarch64.xml"
|
|
arch: "aarch64"
|
|
- version: "android-15-avd_x86_64"
|
|
manifest: "android-15-avd_x86_64.xml"
|
|
arch: "x86_64"
|
|
with:
|
|
version_name: ${{ matrix.version }}
|
|
manifest_name: ${{ matrix.manifest }}
|
|
arch: ${{ matrix.arch }}
|
|
debug: true
|
|
|
|
push-to-branch:
|
|
needs: [build-kernel]
|
|
runs-on: ubuntu-latest
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || inputs.upload
|
|
steps:
|
|
- name: Download all workflow run artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: bin/
|
|
merge-multiple: true
|
|
- name: Push to branch LKM
|
|
run: |
|
|
cd bin
|
|
git config --global init.defaultBranch avd
|
|
git init
|
|
git remote add origin https://${{ secrets.TOKEN }}@github.com/${{ github.repository }}
|
|
git config --local user.name "github-actions[bot]"
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
find . -type f
|
|
git add .
|
|
git commit -m "Upload AVD Kernel from ${{ github.sha }}" -m "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
git push --force --set-upstream origin avd
|