Update immortalwrt_R3P.yml

This commit is contained in:
moruiris
2021-10-17 13:26:13 +08:00
committed by GitHub
parent 595983002b
commit f6ba31626b

View File

@ -22,6 +22,7 @@ env:
UPLOAD_FIRMWARE: true UPLOAD_FIRMWARE: true
UPLOAD_RELEASE: true UPLOAD_RELEASE: true
TZ: Asia/Shanghai TZ: Asia/Shanghai
OPENWRT_NAME: immortalwrt
jobs: jobs:
build: build:
@ -105,17 +106,19 @@ jobs:
if: (!cancelled()) if: (!cancelled())
run: df -hT run: df -hT
- name: UPLOAD_FIRMWARE 整理文件 - name: 整理文件
id: organize id: organize
if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
run: | run: |
mkdir firmware && find openwrt/bin/targets/*/*/ -maxdepth 1 \ mkdir firmware && find openwrt/bin/targets/*/*/ -maxdepth 1 \
-name "*combined*" \ -name "*factory*" \
-or -name "*factory*" \
-or -name "*sysupgrade*" \ -or -name "*sysupgrade*" \
-or -name "*combined*" \
| xargs -i mv -f {} ./firmware/ | xargs -i mv -f {} ./firmware/
cp openwrt/.config ./firmware/${{ env.date1 }}_${{ env.DEVICE_NAME }}.config cp openwrt/.config ./firmware/${{ env.date1 }}_${{ env.OPENWRT_NAME }}_${{ env.DEVICE_NAME }}.config
cd firmware cd firmware
sudo -E apt-get -qq install rename
rename 's/^/${{ env.date1 }}_/' *.bin
echo "FIRMWARE=$PWD" >> $GITHUB_ENV echo "FIRMWARE=$PWD" >> $GITHUB_ENV
echo "::set-output name=status::success" echo "::set-output name=status::success"
@ -123,10 +126,10 @@ jobs:
uses: actions/upload-artifact@main uses: actions/upload-artifact@main
if: steps.organize.outputs.status == 'success' && !cancelled() if: steps.organize.outputs.status == 'success' && !cancelled()
with: with:
name: ${{ env.date1 }}_${{ env.DEVICE_NAME }} name: ${{ env.date1 }}_${{ env.OPENWRT_NAME }}_${{ env.DEVICE_NAME }}
path: ${{ env.FIRMWARE }} path: ${{ env.FIRMWARE }}
- name: UPLOAD_RELEASE 生成发布标签 - name: 生成发布标签
id: tag id: tag
if: env.UPLOAD_RELEASE == 'true' && !cancelled() if: env.UPLOAD_RELEASE == 'true' && !cancelled()
run: | run: |