Skip to content

Commit

Permalink
feat: cleanup source uploading
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Sep 30, 2022
1 parent fe0be6f commit 474dd85
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/update-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ jobs:
env:
RSYNC_ADDR: ${{ secrets.RSYNC_ADDR }}
RSYNC_USER: ${{ secrets.RSYNC_USER }}
RSYNC_PASS: ${{ secrets.RSYNC_PASS }}
run: sshpass -p "$RSYNC_PASS" rsync -ahvHP --exclude "*cache*" "immortalwrt/dl/" "rsync://${RSYNC_USER}@${RSYNC_ADDR}/dl/"
RSYNC_PASSWORD: ${{ secrets.RSYNC_PASS }}
run: |
find 'immortalwrt/dl/' -maxdepth 1 -type f -not -size 0 -not -name '.*' -not -name '*.hash' -not -name '*.dl' -printf '%f\\n' > 'sourcelist'
rsync --files-from="sourcelist" --size-only --delay-updates --partial-dir=".~tmp~$GITHUB_RUN_ID" -ahv "immortalwrt/dl/" "rsync://${RSYNC_USER}@${RSYNC_ADDR}/dl/"
- name: Upload Files to OSDN
uses: Pendect/action-rsyncer@2554a1e574cf229fb144f23ea5971dbdca8ae8e3
with:
flags: '-ahvHP'
options: '--exclude "*cache*"'
flags: '-ahv'
options: '--files-from=sourcelist --size-only --delay-updates --partial-dir=.~tmp~${{ env.GITHUB_RUN_ID }}'
src: 'immortalwrt/dl/'
dest: '${{ secrets.OSDN_USER }}@storage.osdn.net:/storage/groups/i/im/immortalwrt/sources/'
env:
Expand Down

0 comments on commit 474dd85

Please sign in to comment.