diff --git a/.github/workflows/openwrt-packages.yml b/.github/workflows/openwrt-packages.yml index 04f37e44..2953f2ef 100644 --- a/.github/workflows/openwrt-packages.yml +++ b/.github/workflows/openwrt-packages.yml @@ -1,64 +1,63 @@ - -name: Update openwrt-packages - -on: - push: - paths: - - '.github/workflows/openwrt-packages.yml' - - 'diy/**' - schedule: - - cron: 0 */12 * * * - watch: - types: started - repository_dispatch: - -jobs: - build: - runs-on: Ubuntu-20.04 - - name: Update ${{matrix.target}} - strategy: - fail-fast: false - matrix: - target: [master] - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Initialization environment - 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: Clone packages - run: | - cd $GITHUB_WORKSPACE - chmod +x ${{matrix.target}}.sh - git clone -b ${{matrix.target}} https://github.com/kenzok8/openwrt-packages.git ${{matrix.target}} - cd ${{matrix.target}} - git rm -r --cache * >/dev/null 2>&1 & - $GITHUB_WORKSPACE/${{matrix.target}}.sh - $GITHUB_WORKSPACE/Modify.sh - - - name: Upload - env: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - run: | - [ -e $GITHUB_WORKSPACE/LICENSE ] && cp $GITHUB_WORKSPACE/LICENSE $GITHUB_WORKSPACE/${{matrix.target}} - [ -e $GITHUB_WORKSPACE/README.md ] && cp $GITHUB_WORKSPACE/README.md $GITHUB_WORKSPACE/${{matrix.target}} - cd $GITHUB_WORKSPACE/${{matrix.target}} - git add . - git commit -m "update $(date +%Y-%m-%d" "%H:%M:%S)" - git push --quiet "https://${{ secrets.ACCESS_TOKEN }}@github.com/kenzok8/openwrt-packages.git" HEAD:${{matrix.target}} - - - - name: Delete workflow runs - uses: GitRML/delete-workflow-runs@main - with: - retain_days: 1 - keep_minimum_runs: 0 - + +name: Update openwrt-packages + +on: + push: + paths: + - '.github/workflows/openwrt-packages.yml' + - 'diy/**' + schedule: + - cron: 0 */12 * * * + watch: + types: started + repository_dispatch: + +jobs: + build: + runs-on: Ubuntu-20.04 + + name: Update ${{matrix.target}} + strategy: + fail-fast: false + matrix: + target: [master] + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Initialization environment + 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: Clone packages + run: | + cd $GITHUB_WORKSPACE + chmod +x ${{matrix.target}}.sh + git clone -b ${{matrix.target}} https://github.com/kenzok8/openwrt-packages.git ${{matrix.target}} + cd ${{matrix.target}} + $GITHUB_WORKSPACE/${{matrix.target}}.sh + $GITHUB_WORKSPACE/Modify.sh + + - name: Upload + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: | + [ -e $GITHUB_WORKSPACE/LICENSE ] && cp $GITHUB_WORKSPACE/LICENSE $GITHUB_WORKSPACE/${{matrix.target}} + [ -e $GITHUB_WORKSPACE/README.md ] && cp $GITHUB_WORKSPACE/README.md $GITHUB_WORKSPACE/${{matrix.target}} + cd $GITHUB_WORKSPACE/${{matrix.target}} + git add . + git commit -m "update $(date +%Y-%m-%d" "%H:%M:%S)" + git push --quiet "https://${{ secrets.ACCESS_TOKEN }}@github.com/kenzok8/openwrt-packages.git" HEAD:${{matrix.target}} + + + - name: Delete workflow runs + uses: GitRML/delete-workflow-runs@main + with: + retain_days: 1 + keep_minimum_runs: 0 + diff --git a/.github/workflows/sync-small.yml b/.github/workflows/sync-small.yml index f715056b..091a4dd3 100644 --- a/.github/workflows/sync-small.yml +++ b/.github/workflows/sync-small.yml @@ -40,7 +40,6 @@ jobs: chmod +x small.sh git clone -b ${{matrix.target}} https://github.com/kenzok8/small.git ${{matrix.target}} cd ${{matrix.target}} - git rm -r --cache * >/dev/null 2>&1 & $GITHUB_WORKSPACE/small.sh - name: Upload diff --git a/master.sh b/master.sh index 8581bb6e..94cb144c 100755 --- a/master.sh +++ b/master.sh @@ -66,10 +66,7 @@ svn co https://github.com/coolsnowwolf/packages/trunk/multimedia/UnblockNeteaseM svn co https://github.com/immortalwrt/packages/trunk/net/gost svn co https://github.com/immortalwrt/packages/trunk/utils/filebrowser -mv -n openwrt-passwall/* ./ ; rm -Rf openwrt-passwall -mv -n openwrt-package/* ./ ; rm -Rf openwrt-package - -rm -rf ./*/.git & rm -f ./*/.gitattributes +rm -rf ./*/.git & rm -rf ./*/.gitattributes rm -rf ./*/.svn & rm -rf ./*/.github & rm -rf ./*/.gitignore exit 0 \ No newline at end of file