From 3e662bcb429c0d70f17044f930d0fbf6063b6a55 Mon Sep 17 00:00:00 2001 From: moruiris <53965900+moruiris@users.noreply.github.com> Date: Fri, 6 Jan 2023 16:51:13 +0800 Subject: [PATCH] Update Openwrt_x86.yml --- .github/workflows/Openwrt_x86.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/Openwrt_x86.yml b/.github/workflows/Openwrt_x86.yml index dcb35fb..2c0992c 100644 --- a/.github/workflows/Openwrt_x86.yml +++ b/.github/workflows/Openwrt_x86.yml @@ -134,3 +134,25 @@ jobs: name: ${{ env.date3 }} tag_name: ${{ steps.tag.outputs.release_tag }} body_path: release.txt + + - name: config文件上传自动更新1 + run : | + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + sudo timedatectl set-timezone "Asia/Shanghai" + - name: config文件上传自动更新2 + run: | + cd $GITHUB_WORKSPACE + git clone -b main https://github.com/moruiris/Actions-OpenWrt.git main + cd main + git rm -r --cache * >/dev/null 2>&1 & + rm -rf * >/dev/null 2>&1 + - name: config文件上传自动更新3 + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: | + cd $GITHUB_WORKSPACE/main + git add . + git commit -am "update $(date +%Y-%m-%d" "%H:%M:%S)" + git push --quiet "https://${{ secrets.ACCESS_TOKEN }}@github.com/moruiris/Actions-OpenWrt.git" HEAD:main +