Skip to content

Commit

Permalink
feat: remove onedrive upload
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Mar 30, 2024
1 parent 1b650c0 commit 1039f1c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 36 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/update-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout the Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Init Compilation Dependencies
env:
Expand All @@ -34,7 +34,7 @@ jobs:
sudo -E apt-get -qq clean
- name: Checkout ImmortalWrt Source Tree on Branch ${{ matrix.branch }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: "immortalwrt/immortalwrt"
ref: ${{ matrix.branch }}
Expand All @@ -55,7 +55,7 @@ jobs:
find dl -size -1024c -exec rm -f {} \;
- name: Fetch Cached Uploader Keys
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "uploader-keys"
key: immortalwrt-mirror-uploader-${{ github.run_id }}
Expand All @@ -81,26 +81,14 @@ jobs:
env:
DEPLOY_KEY: ${{ secrets.SF_KEY }}

- name: Upload Files to OneDrive
env:
ODRS_REFRESH_TOKEN: ${{ secrets.ODRS_REFRESH_TOKEN }}
UPLOADER_TYPE: "onedrive"
UPLOADER_CONF: "uploader.json"
run: |
mkdir -p package-sources
for i in $(cat "sourcelist"); do mv "immortalwrt/dl/$i" "package-sources/"; done
[ -f "uploader-keys/$UPLOADER_TYPE.json" ] && cp -f "uploader-keys/$UPLOADER_TYPE.json" "$UPLOADER_CONF" || ./onedrive-uploader/gen-onedriveconf.sh
./onedrive-uploader/OneDriveUploader -f -c "$UPLOADER_CONF" -s "package-sources" -r "/" -skip
[ -d "uploader-keys" ] || mkdir -p "uploader-keys"
cp -f "$UPLOADER_CONF" "uploader-keys/$UPLOADER_TYPE.json"
cleanup-workflow-runs:
runs-on: ubuntu-latest
needs: update-mirror
steps:
- name: Cleanup Workflow Runs
uses: GitRML/delete-workflow-runs@v1.2.1
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 7
keep_minimum_runs: 1
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
## Reference
[SuLingGG/OpenWrt-Mini/update-immortalwrt-1806-dl-mirror.yml](https://github.com/SuLingGG/OpenWrt-Mini/blob/381524b297bc346c3afbf779eef8601ffe6c469f/.github/workflows/update-immortalwrt-1806-dl-mirror.yml).<br/>
[MoeClub/OneList/OneDriveUploader](https://github.com/MoeClub/OneList/tree/206b44d9a129d383211806f02a600a96893e2445/OneDriveUploader).
Binary file removed onedrive-uploader/OneDriveUploader
Binary file not shown.
18 changes: 0 additions & 18 deletions onedrive-uploader/gen-onedriveconf.sh

This file was deleted.

0 comments on commit 1039f1c

Please sign in to comment.