Skip to content

Commit

Permalink
Update miui_res.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pzcn committed Oct 18, 2023
1 parent 7280f6a commit 633d3a0
Showing 1 changed file with 4 additions and 40 deletions.
44 changes: 4 additions & 40 deletions .github/workflows/miui_res.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
mkdir -p /tmp/git_push
cp -a -r icons/* /tmp/git_push
cd /tmp/git_push
remote_repo="https://${{ secrets.GIT_USERS }}:${{ secrets.GIT_TOKEN }}@e.coding.net/miuiicons/icons/icons.git"
remote_repo="https://${{ secrets.GIT_USERS }}:${{ secrets.GIT_TOKEN }}@e.coding.net/miuiicons/icons/icons2.git"
git clone --depth 1 $remote_repo /tmp/dest
rm -rf /tmp/git_push/.git
cp -r /tmp/dest/.git/ /tmp/git_push/.git/
Expand All @@ -43,46 +43,10 @@ jobs:
echo "theme_name=主图标仓库" >> ./iconsrepo.ini
echo "theme_version=$(TZ=':Asia/Shanghai' date '+%Y%m%d%H%M')" >> ./iconsrepo.ini
#curl -T iconsrepo.tar.xz -u ${{secrets.coding_password}} "https://miuiicons-generic.pkg.coding.net/icons/files/iconsrepo.tar.xz?version=latest"
curl -T iconsrepo.ini -u ${{secrets.coding_password}} "https://miuiicons-generic.pkg.coding.net/icons/files/iconsrepo.ini?version=latest"
curl -T iconscount.txt -u ${{secrets.coding_password}} "https://miuiicons-generic.pkg.coding.net/icons/files/iconscount.txt?version=latest"
curl -T iconsrepo.ini -u ${{secrets.coding_password}} "https://miuiicons-generic.pkg.coding.net/icons/icons/iconsrepo.ini?version=latest"
curl -T iconscount.txt -u ${{secrets.coding_password}} "https://miuiicons-generic.pkg.coding.net/icons/icons/iconscount.txt?version=latest"
curl https://rclone.org/install.sh | sudo bash
mkdir -p ~/.config/rclone/
echo ${{ secrets.DBBASE64 }} > base64.txt
base64 --decode base64.txt > ~/.config/rclone/rclone.conf
rclone copy -P iconsrepo.tar.xz onedrive:/icons/miui
- name: Get Env
run: |
echo time=$(TZ=':Asia/Shanghai' date '+%Y.%m.%d %H:%M') >> $GITHUB_ENV
echo "${{ github.event.head_commit.message }}" > 1.txt
echo changelog=$(awk '{printf " %s\\n \\n ", $0}' 1.txt) >> $GITHUB_ENV
- name: Push changelog
run: |
curl -i -X POST -H 'Content-type':'application/json' -d '{"token":"${{secrets.push_token}}","title":"完美图标更新通知","content":" **完美图标更新了** \n \n **更新时间:${{ env.time }}** \n \n **更新内容** \n \n ``` \n \n ${{ github.event.head_commit.message }} \n \n ``` \n \n by ` ${{ github.event.head_commit.author.name }} ` \n \n [查看详细更新内容](${{ github.event.head_commit.url }}) \n \n 可前往完美图标计划APP进行更新或下载。 ","topic":"MIUI","template":"markdown"}' http://www.pushplus.plus/send
curl -i -X POST -H 'Content-type':'application/json' -d '{"appToken":"${{secrets.push_token2}}","summary":"完美图标更新通知","content":" **完美图标更新了** \n \n **更新时间:${{ env.time }}** \n \n **更新内容** \n \n ``` \n \n ${{ env.changelog }} ``` \n \n by ` ${{ github.event.head_commit.author.name }} ` \n \n [查看详细更新内容](${{ github.event.head_commit.url }}) \n \n 可前往完美图标计划APP进行更新或下载。 ","topicIds":[4163],"contentType":3}' http://wxpusher.zjiecode.com/api/send/message
- name: Update changelog
run: |
curl -skLJo old.xml https://miuiicons-generic.pkg.coding.net/icons/files/changelog.xml?version=latest
time=$(TZ=':Asia/Shanghai' date '+%Y.%m.%d %H:%M')
sed -i '1,7d' old.xml
:>new.xml
cat >> new.xml << \EOF
<?xml version="1.0" encoding="UTF-8" ?>
<group>
<page html="https://iconsx.pedroz.eu.org/push.html" icon="push.png">
<title>订阅新版本通知</title>
<desc>通过微信订阅后,有新版本会推送通知</desc>
</page>
</group>
<group>
<text>
<title>${{ env.time }}</title>
<desc>${{ github.event.head_commit.message }}
by ${{ github.event.head_commit.author.name }}</desc>
<slice break="break" link="${{ github.event.head_commit.url }}" underline="underline"> 轻触查看详细内容>> </slice>
</text>
</group>
EOF
:>output.xml
cat new.xml old.xml > output.xml
curl -T output.xml -u ${{secrets.coding_password}} "https://miuiicons-generic.pkg.coding.net/icons/files/changelog.xml?version=latest"
rclone copy -P iconsrepo.tar.xz onedrive:/icons2/miui

0 comments on commit 633d3a0

Please sign in to comment.