From 65dd6d0cdefb32608ecf43c91314d2581d853958 Mon Sep 17 00:00:00 2001 From: 5ec1cff Date: Thu, 30 Jan 2025 12:57:12 +0800 Subject: [PATCH] upload avd kernels --- .github/workflows/build-kernel-avd.yml | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/build-kernel-avd.yml b/.github/workflows/build-kernel-avd.yml index 504a5207..ca3ef004 100644 --- a/.github/workflows/build-kernel-avd.yml +++ b/.github/workflows/build-kernel-avd.yml @@ -16,12 +16,19 @@ on: - "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" @@ -38,3 +45,26 @@ jobs: 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