Add optional fork input to GitHub Actions workflow

This commit is contained in:
Aditya Garg
2026-04-14 00:26:00 +05:30
committed by GitHub
parent 465419daa3
commit b6f6e05772
+14 -4
View File
@@ -7,7 +7,9 @@ on:
commit_message:
description: 'Commit message'
required: false
fork:
description: 'Link to any fork if needed'
required: false
jobs:
Publish-Mainline:
runs-on: ubuntu-latest
@@ -25,8 +27,12 @@ jobs:
source ${{ github.workspace }}/version
echo "kver=${KVER}" >> $GITHUB_ENV
FORK="${{ github.event.inputs.fork }}"
if [ -z "$FORK" ]; then
FORK='https://github.com/t2linux/apple-bce-drv.git'
fi
git clone --depth 1 --single-branch --branch "v${KVER}" https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git clone --depth 1 https://github.com/t2linux/apple-bce-drv.git ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce
git clone --depth 1 $FORK ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce
rm -rf ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce/.git
rm ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce/.gitignore
rm ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce/README.md
@@ -105,8 +111,12 @@ jobs:
source ${{ github.workspace }}/version
echo "kver=${KVER}" >> $GITHUB_ENV
FORK="${{ github.event.inputs.fork }}"
if [ -z "$FORK" ]; then
FORK='https://github.com/t2linux/apple-bce-drv.git'
fi
git clone --depth 1 --single-branch --branch "v${KVER}" https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git clone --depth 1 https://github.com/t2linux/apple-bce-drv.git ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce
git clone --depth 1 $FORK ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce
rm -rf ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce/.git
rm ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce/.gitignore
rm ${{ github.workspace }}/linux-stable/drivers/staging/apple-bce/README.md
@@ -166,4 +176,4 @@ jobs:
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 6.12
branch: 6.12