From de200c316b81e15555db3b5e4848db61c411063b Mon Sep 17 00:00:00 2001 From: Yash Bagarka Date: Wed, 18 Oct 2023 10:29:54 +0000 Subject: [PATCH 1/3] modified the conditonal trigger, removed an extra docker login command Signed-off-by: Yash Bagarka --- .github/workflows/publish.yml | 25 ++++++++++++------------- Makefile.eve | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d5725e6e15731..612f2f09384de 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,39 +1,38 @@ name: eve-kernel build + on: + workflow_dispatch: pull_request_review: - types: [submitted] - pull_request: - types: [opened, synchronize, closed] + types: [ submitted ] push: branches: - "eve-kernel-amd64-v6.1.38-generic" - workflow_dispatch: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true + jobs: packages: runs-on: self-hosted + if: ${{ github.event.review.state == 'approved' || github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' }} steps: - name: Get eve-kernel uses: actions/checkout@v3 with: ref: "eve-kernel-amd64-v6.1.38-generic" - - name: Always build eve-kernel-amd64 + + - name: Build eve-kernel-amd64 run: | make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} kernel-gcc + - name: Log in to Docker Hub - if: ( github.event_name == 'pull_request' && github.event.pull_request.merged == true ) || github.event_name == 'push' # Only if PR is merged or it was direct push uses: docker/login-action@v3 with: username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }} password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }} - - name: Login to DockerHUB - if: ( github.event_name == 'pull_request' && github.event.pull_request.merged == true ) || github.event_name == 'push' # Only if PR is merged or it was direct push - run: | - echo "${{ secrets.RELEASE_DOCKERHUB_TOKEN }}" |\ - docker login -u "${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}" --password-stdin + - name: Push eve-kernel-amd64-v6.1.38-generic if PR approved or pushed - if: ( github.event_name == 'pull_request' && github.event.pull_request.merged == true ) || github.event_name == 'push' # Only if PR is merged or it was direct push + if: github.ref == 'refs/heads/eve-kernel-amd64-v6.1.38-generic' run: | - make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc + make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc diff --git a/Makefile.eve b/Makefile.eve index 652b9ff1af243..3405448452067 100644 --- a/Makefile.eve +++ b/Makefile.eve @@ -40,6 +40,6 @@ kernel-%: Dockerfile.% docker-tag-%: @echo "docker.io/lfedge/eve-kernel:$(BRANCH)-$(VERSION)$(DIRTY)-$*" -push-%: kernel-% +push-%: $(if $(DIRTY), $(error "Not pushing since the repo is dirty")) docker push lfedge/eve-kernel:$(BRANCH)-$(VERSION)-$* From 712409c67018cb91440cff9e7962f7e2daba1c07 Mon Sep 17 00:00:00 2001 From: Yash Bagarka Date: Thu, 19 Oct 2023 12:25:05 +0000 Subject: [PATCH 2/3] test commit for PR build testing Signed-off-by: Yash Bagarka --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 669ac7c322927..740eb34e3f4eb 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Linux kernel +Linux kernel instructions ============ There are several guides for kernel developers and users. These guides can From 681c7a5d2d4104629eed0867022d1748a86f1bf6 Mon Sep 17 00:00:00 2001 From: Yash Bagarka Date: Thu, 19 Oct 2023 12:49:37 +0000 Subject: [PATCH 3/3] other commit for the PR build Signed-off-by: Yash Bagarka --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 740eb34e3f4eb..5e675a6bb01ee 100644 --- a/README +++ b/README @@ -1,4 +1,5 @@ Linux kernel instructions + ============ There are several guides for kernel developers and users. These guides can @@ -8,7 +9,7 @@ Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: - https://www.kernel.org/doc/html/latest/ +https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.