From 28fd9837b0834e9d3aaf4cc9d055ba518c030389 Mon Sep 17 00:00:00 2001 From: Vishal Kumar Date: Wed, 28 May 2025 12:06:51 +0530 Subject: [PATCH] ci: Fix: enable pre_merge CI workflow for all branches The pre-merge process should be utilized for kernel-topics as well and must be accessible across all branches. Additionally, the bash shell has been removed from the checkout code. Signed-off-by: Vishal Kumar --- .github/actions/sync/action.yml | 10 +++++++++- .github/workflows/build.yml | 5 +++++ .github/workflows/pre_merge.yml | 2 -- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/actions/sync/action.yml b/.github/actions/sync/action.yml index f3c852977500a..b10fb2cd27580 100644 --- a/.github/actions/sync/action.yml +++ b/.github/actions/sync/action.yml @@ -17,10 +17,16 @@ outputs: runs: using: "composite" steps: + - name: Clean workspace + shell: bash + run: | + echo "Cleaning up workspace..." + rm -rf ${{ github.workspace }}/* + echo "Workspace cleaned successfully!" + - name: Checkout PR branch if: inputs.base_branch == 'qcom-next-staging' uses: actions/checkout@v4 - shell: bash with: fetch-depth: 0 @@ -82,3 +88,5 @@ runs: echo "workspace=${{ github.workspace }}" >> "$GITHUB_OUTPUT" else echo "workspace=${{ github.workspace }}/kernel" >> "$GITHUB_OUTPUT" + fi + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93989491dd61c..55028998299a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,11 @@ jobs: group: GHA-Kernel-SelfHosted-RG labels: [ self-hosted, kernel-prd-u2404-x64-large-od-ephem ] steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Sync codebase id: sync uses: ./.github/actions/sync diff --git a/.github/workflows/pre_merge.yml b/.github/workflows/pre_merge.yml index 0bca8e714311f..8914f0f948043 100644 --- a/.github/workflows/pre_merge.yml +++ b/.github/workflows/pre_merge.yml @@ -1,8 +1,6 @@ name: pre_merge on: pull_request_target: - branches: - - qcom-next-staging jobs: build: