Skip to content

xx

xx #24

# This is a basic workflow to help you get started with Actions
name: Sync to fuse-kernel-modules
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
sync:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
path: linux
- uses: actions/checkout@v4
with:
repository: openunix/fuse-kernel-modules
ref: "sync-${{ github.ref_name }}"
fetch-depth: 0
path: fuse-kernel-modules
token: ${{ secrets.OPENUNIXPAT }}
- name: Import GPG keys
run: |
gpg --import << EOF
${{ secrets.GPG_PRIVATE_KEY }}
EOF
# Runs a single command using the runners shell
- name: Generate codes for fuse-kernel-modules
run: |
pushd fuse-kernel-modules
./copy-from-linux-branch $GITHUB_WORKSPACE/linux ${{ github.ref_name }}
git config --global user.name "Feng Shuo"
git config --global user.email "[email protected]"
git config --global user.signingkey F96A409277704327
git add src/${{ github.ref_name }}
echo -e "Auto sync with openunix/linux branch ${{ github.ref_name }} \n" > ../commit.msg
echo -e "Auto sync with openunix/linux branch ${{ github.ref_name }} commit" >> ../commit.msg
echo -e "${{ github.sha }}" >> ../commit.msg
cat ../commit.msg
git commit -S -F ../commit.msg > ../commit.log 2>&1 ||:
if [ -s ../commit.log ]; then
cat ../commit.log
else
git push 2> ../push.log ||:
fi
if [ -s ../push.log ]; then
cat ../push.log
fi
gh pr create --base main --fill
popd
env:
GH_TOKEN: ${{ github.token }}
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo ${{ github.ref_name }}
find $GITHUB_WORKSPACE -maxdepth=2