Skip to content

Commit

Permalink
优化脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
Drixn0 committed Jun 24, 2023
1 parent 8c5f5cd commit 30020d0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/Build_OP_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@ jobs:
[ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV
echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
- name: 整理文件
id: organize
if: steps.compile.outputs.status == 'success' && !cancelled()
run: |
cd openwrt/bin/targets/*/*
rm -rf packages
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
echo "status=success" >> $GITHUB_OUTPUT
- name: 清理磁盘空间
if: (!cancelled())
run: |
Expand All @@ -200,23 +209,14 @@ jobs:
echo -e "\n"
echo "列出空间占用前10的目录或文件:"
sudo du -h --max-depth=1 /workdir/openwrt |sort -nr | head -10
- name: 上传文件
uses: actions/upload-artifact@main
if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true'
with:
name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
path: openwrt/bin

- name: 整理文件
id: organize
if: steps.compile.outputs.status == 'success' && !cancelled()
run: |
cd openwrt/bin/targets/*/*
rm -rf packages
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
echo "status=success" >> $GITHUB_OUTPUT
- name: 上传固件
uses: actions/upload-artifact@master
if: env.UPLOAD_FIRMWARE == 'true' && steps.organize.outputs.status == 'success' && !cancelled()
Expand Down

0 comments on commit 30020d0

Please # to comment.