Skip to content

Commit

Permalink
Add flippy source code version query
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Nov 18, 2021
1 parent dff921b commit 965fdca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/compile-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,15 @@ jobs:
fi
echo "KERNEL_VER=${KERNEL_VER}" >> $GITHUB_ENV
- name: Compile the Kernel ${{ env.KERNEL_REPO }} ${{ env.KERNEL_VER }}
- name: Compile the Kernel [ -k ${{ env.KERNEL_VER }} -r ${{ env.KERNEL_REPO }} ]
id: compile
run: |
sudo chmod +x recompile
sudo ./recompile -k ${{ env.KERNEL_VER }} -r ${{ env.KERNEL_REPO }}
echo "PACKAGED_OUTPUTPATH=${PWD}/compile-kernel/output" >> $GITHUB_ENV
output_dirname="${PWD}/compile-kernel/output"
output_tags="$(ls ${output_dirname}/*.tar.gz -l | grep "^-" | awk '{print $9}' | grep -oE '[1-9].[0-9]{1,3}.[0-9]+' | xargs | tr "[ ]" "_")"
echo "PACKAGED_OUTPUTTAGS=${output_tags}" >> $GITHUB_ENV
echo "PACKAGED_OUTPUTPATH=${output_dirname}" >> $GITHUB_ENV
echo "PACKAGED_OUTPUTDATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
echo "::set-output name=status::success"
Expand All @@ -93,12 +96,12 @@ jobs:
uses: ncipollo/release-action@v1
if: steps.compile.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
tag: kernel_${{ env.KERNEL_VER }}
tag: kernel_${{ env.PACKAGED_OUTPUTTAGS }}
artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
The kernel can be used to compile Armbian and OpenWer.
The kernel source code comes from: ${{ env.KERNEL_REPO }}
2 changes: 1 addition & 1 deletion recompile
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ done

check_environment
# Set whether to replace the kernel
[ "${auto_kernel}" == "true" ] && query_version
[[ "${auto_kernel}" == "true" || "${repo_url}" == "flippy" ]] && query_version

[ $(id -u) = 0 ] || die "please run this script as root: [ sudo ./$0 ]"
echo -e "Welcome to compile kernel! \n"
Expand Down

0 comments on commit 965fdca

Please sign in to comment.