From 7e3ab9bca62d0bc21e6afa49eecf4245399f5af1 Mon Sep 17 00:00:00 2001 From: zhao Date: Fri, 16 Jan 2026 21:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20.github/workflows/target?= =?UTF-8?q?=5Flinux=5Fx86.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- .github/workflows/target_linux_x86.yml | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/target_linux_x86.yml diff --git a/.github/workflows/target_linux_x86.yml b/.github/workflows/target_linux_x86.yml new file mode 100644 index 0000000..ebdc0bf --- /dev/null +++ b/.github/workflows/target_linux_x86.yml @@ -0,0 +1,53 @@ +name: target_linux_x86 + +on: + repository_dispatch: + workflow_dispatch: + schedule: + - cron: 0 */4 * * * + +jobs: + job_sync: + if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id + runs-on: ubuntu-22.04 + + name: Update target_linux_x86 + 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/target_linux_x86.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/target_linux_x86.git" HEAD:openwrt-25.12 + else + echo "nothing to commit" + exit 0 + fi || exit 0 \ No newline at end of file