From 9fb24cc7a65395c4b02a514928187fd547821c18 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 23 Mar 2022 18:15:16 +0100 Subject: [PATCH] action: compile and commit new kernel --- .github/workflows/cron.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index ff1ea79..b2127dd 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -25,6 +25,7 @@ jobs: - name: Fetch latest kernel if: steps.check.outputs.sha != '' + id: fetch run: | git submodule update --init --depth=1 linux-sources echo "sha ${{steps.check.outputs.sha}}" @@ -33,10 +34,15 @@ jobs: git fetch --depth=1 origin ${{steps.check.outputs.sha}} echo "checkout" git checkout ${{steps.check.outputs.sha}} + echo "::set-output name=tag::$(git describe --tags)" cd .. git diff --no-ext-diff - # - name: Commit the new kernel - # uses: stefanzweifel/git-auto-commit-action@v4 - # with: - # commit_message: kernel ${{steps.check.outputs.sha}} + - name: Compile latest kernel + if: steps.check.outputs.sha != '' + run: go run cmd/compile/main.go + + - name: Commit the new kernel + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: kernel ${{steps.fetch.outputs.tag}}