upload avd kernels

This commit is contained in:
5ec1cff
2025-01-30 12:57:12 +08:00
parent 3d35845df3
commit 65dd6d0cde

View File

@@ -16,12 +16,19 @@ on:
- "kernel/**" - "kernel/**"
workflow_call: workflow_call:
workflow_dispatch: workflow_dispatch:
inputs:
upload:
required: false
type: boolean
default: false
description: "Whether to upload to branch"
jobs: jobs:
build-kernel: build-kernel:
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci' if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
uses: ./.github/workflows/avd-kernel.yml uses: ./.github/workflows/avd-kernel.yml
secrets: inherit secrets: inherit
strategy: strategy:
fail-fast: false
matrix: matrix:
include: include:
- version: "android-14-avd_x86_64" - version: "android-14-avd_x86_64"
@@ -38,3 +45,26 @@ jobs:
manifest_name: ${{ matrix.manifest }} manifest_name: ${{ matrix.manifest }}
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
debug: true 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