From a81f6d5c2bebaae109f3571c996684e53d5c8d02 Mon Sep 17 00:00:00 2001 From: ColorfulRhino <131405023+ColorfulRhino@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:05:32 +0200 Subject: [PATCH 1/3] actions: Do not recompile kernel when PR comments are edited - The keyword "edited" refers to PR comments and titles, not to commits (see https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request) - Recompilation is not needed when a PR is closed and reopened, since `synchronize` will take care of any changes --- .github/workflows/compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 244258ab918fa..a0804299f9803 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -3,7 +3,7 @@ name: Build Kernels at PR on: workflow_dispatch: pull_request: - types: [opened, reopened, edited, synchronize] + types: [opened, synchronize] jobs: From c9e008776121bcb2b73f5517a8dccf58c1225f92 Mon Sep 17 00:00:00 2001 From: ColorfulRhino <131405023+ColorfulRhino@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:10:24 +0200 Subject: [PATCH 2/3] actions: Format workflow with YAML formatter and fix spelling --- .github/workflows/compile.yaml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index a0804299f9803..83327752aa7dd 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -1,4 +1,4 @@ -name: Build Kernels at PR +name: Build kernel on PR on: workflow_dispatch: @@ -6,32 +6,30 @@ on: types: [opened, synchronize] jobs: - Build: - name: Compile kernel + name: Compile and upload kernel runs-on: rockchip if: ${{ github.repository_owner == 'armbian' }} env: OCI_TARGET_BASE: "ghcr.io/${{ github.repository }}/" # This is picked up by the Docker launcher automatically steps: - # Login to ghcr.io, for later uploading rootfs to ghcr.io - name: Docker Login to GitHub Container Registry uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} # GitHub username or org - password: ${{ secrets.GITHUB_TOKEN }} # GitHub actions builtin token. repo has to have pkg access. + password: ${{ secrets.GITHUB_TOKEN }} # GitHub actions builtin token. repo has to have pkg access. - name: Checkout build repo uses: actions/checkout@v3 with: repository: armbian/build - ref: main + ref: main fetch-depth: 1 clean: false - - name: Build Kernel at ${{ github.event.pull_request.head.sha }} + - name: Build kernel at ${{ github.event.pull_request.head.sha }} id: kernel run: | @@ -48,7 +46,7 @@ jobs: BRANCH=vendor \ ENABLE_EXTENSIONS="pull-request" - - name: Upload Artifact + - name: Upload artifact uses: actions/upload-artifact@v3 with: name: linux-rockchip-vendor From cf37480896019669badf195e3ab5967c7d481202 Mon Sep 17 00:00:00 2001 From: ColorfulRhino <131405023+ColorfulRhino@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:12:56 +0200 Subject: [PATCH 3/3] actions: Update used Actions to their latest versions --- .github/workflows/compile.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 83327752aa7dd..018b227049d46 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -15,14 +15,14 @@ jobs: steps: # Login to ghcr.io, for later uploading rootfs to ghcr.io - name: Docker Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} # GitHub username or org password: ${{ secrets.GITHUB_TOKEN }} # GitHub actions builtin token. repo has to have pkg access. - name: Checkout build repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: armbian/build ref: main @@ -47,7 +47,7 @@ jobs: ENABLE_EXTENSIONS="pull-request" - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-rockchip-vendor path: output/debs/*.deb