ci: 💚 use foxundermoon/setup-qshell@v1

This commit is contained in:
FairyEver 2021-01-03 10:14:49 +08:00
parent a94de6f382
commit 1508cb9012
1 changed files with 12 additions and 9 deletions

View File

@ -24,16 +24,19 @@ jobs:
done done
- name: Build - name: Build
run: yarn build:preview --report run: yarn build:preview --report
- name: CDN download qshell - name: Setup qshell
run: | uses: foxundermoon/setup-qshell@v1
wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip env:
unzip qshell-linux-x86-v2.4.0.zip ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
mv qshell-linux-x86-v2.4.0 qshell with:
- name: CDN login qshell-version: '2.4.0'
run: ./qshell account ${{ secrets.AK }} ${{ secrets.SK }} GITHUB_ACTION - name: Test qshell
run: qshell version
- name: Login
run: qshell account ${{ secrets.AK }} ${{ secrets.SK }} GITHUB_ACTION
- name: CDN upload - name: CDN upload
run: | run: |
./qshell qupload2 \ qshell qupload2 \
--src-dir=$GITHUB_WORKSPACE/dist \ --src-dir=$GITHUB_WORKSPACE/dist \
--bucket=d2-cdn \ --bucket=d2-cdn \
--key-prefix=${GITHUB_REPOSITORY//*\//}/preview/ \ --key-prefix=${GITHUB_REPOSITORY//*\//}/preview/ \
@ -46,7 +49,7 @@ jobs:
- name: CDN refresh - name: CDN refresh
run: | run: |
echo "https://cdn.d2.pub/${GITHUB_REPOSITORY//*\//}/preview/" > cdnrefresh.txt echo "https://cdn.d2.pub/${GITHUB_REPOSITORY//*\//}/preview/" > cdnrefresh.txt
./qshell cdnrefresh --dirs -i ./cdnrefresh.txt qshell cdnrefresh --dirs -i ./cdnrefresh.txt
ftp: ftp:
name: FTP name: FTP