From c0477a61789d5cac1c9d866b31538012432aa988 Mon Sep 17 00:00:00 2001 From: PuerNya Date: Tue, 3 Dec 2024 01:40:34 +0800 Subject: [PATCH] Auto push lkms to branch `LKM` --- .github/workflows/build-lkm.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-lkm.yml b/.github/workflows/build-lkm.yml index 7a5b73e5..5798b897 100644 --- a/.github/workflows/build-lkm.yml +++ b/.github/workflows/build-lkm.yml @@ -41,4 +41,27 @@ jobs: version_name: ${{ matrix.version }}.${{ matrix.sub_level }} tag: ${{ matrix.version }}-${{ matrix.os_patch_level }} os_patch_level: ${{ matrix.os_patch_level }} - build_lkm: true \ No newline at end of file + build_lkm: true + + + push-to-branch: + needs: [build-lkm] + runs-on: ubuntu-latest + 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 lkm + git init + git remote add origin https://${{ github.actor }}:${{ 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 LKM" + git push --force --set-upstream origin lkm