Files
package_kernel_mt76/.github/workflows/package_kernel_mt76.yml
zhao d4df00fe0e
All checks were successful
package_kernel_mt76 / Update package_kernel_mt76 (openwrt-25.12) (push) Successful in 7s
更新 .github/workflows/package_kernel_mt76.yml
Signed-off-by: zhao <zj18139624826@gmail.com>
2026-01-19 18:50:11 +08:00

53 lines
1.7 KiB
YAML

name: package_kernel_mt76
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
jobs:
job_sync:
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id
runs-on: ubuntu-22.04
name: Update package_kernel_mt76
strategy:
fail-fast: false
matrix:
target: [openwrt-25.12]
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Initialization environment
run : |
git config --global user.name "zhao"
git config --global user.email "zj18139624826@gmail.com"
- name: Clone openwrt-25.12
run: |
cd $GITHUB_WORKSPACE
chmod +x .github/diy/sync.sh
git clone -b openwrt-25.12 https://gitea.kejizero.xyz/zhao/package_kernel_mt76.git ${{matrix.target}}
cd ${{matrix.target}}
rm -rf `find ./* -maxdepth 0 -type d ! -name "commit"` >/dev/null 2>&1
$GITHUB_WORKSPACE/.github/diy/sync.sh
- name: Upload
env:
GIT_PASSWORD: ${{ secrets.git_password }}
run: |
cd $GITHUB_WORKSPACE/${{matrix.target}}
if git status --porcelain | grep .; then
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
git add .
git commit -am "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M:%S)"
git push --quiet "https://zhao:${GIT_PASSWORD}@gitea.kejizero.xyz/zhao/package_kernel_mt76.git" HEAD:openwrt-25.12
else
echo "nothing to commit"
exit 0
fi || exit 0