61 lines
2.4 KiB
Markdown
61 lines
2.4 KiB
Markdown
![]() |
|
|||
|
# luci-app-easyupdate<74><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7B8>£<EFBFBD>
|
|||
|
|
|||
|
<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>P3TERX/Actions-OpenWrt<72>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD><CCBC><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
### ʹ<>÷<EFBFBD><C3B7><EFBFBD>
|
|||
|
|
|||
|
#### <20><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
```yaml
|
|||
|
- name: Install feeds
|
|||
|
run: cd openwrt && ./scripts/feeds install -a -f
|
|||
|
```
|
|||
|
#### <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2><EFBFBD>
|
|||
|
```yaml
|
|||
|
- name: Openwrt AutoUpdate
|
|||
|
run: |
|
|||
|
TEMP=$(date +"OpenWrt_%Y%m%d_%H%M%S_")$(git rev-parse --short HEAD)
|
|||
|
echo "RELEASE_TAG=$TEMP" >> $GITHUB_ENV
|
|||
|
#required>>add "DISTRIB_GITHUB" to "zzz-default-settings"
|
|||
|
sed -i "/DISTRIB_DESCRIPTION=/a\sed -i '/DISTRIB_GITHUB/d' /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings
|
|||
|
sed -i "/DISTRIB_GITHUB/a\echo \"DISTRIB_GITHUB=\'https://github.com/${{github.repository}}\'\" >> /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings
|
|||
|
#required>>add "DISTRIB_VERSIONS" to "zzz-default-settings"
|
|||
|
sed -i "/DISTRIB_DESCRIPTION=/a\sed -i '/DISTRIB_VERSIONS/d' /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings
|
|||
|
sed -i "/DISTRIB_VERSIONS/a\echo \"DISTRIB_VERSIONS=\'${TEMP:8}\'\" >> /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings
|
|||
|
#nonessential>>add "github.actor" to "DISTRIB_DESCRIPTION" in "zzz-default-settings"
|
|||
|
sed -i "s/OpenWrt /${{github.actor}} compiled (${TEMP:8}) \/ OpenWrt /g" openwrt/package/lean/default-settings/files/zzz-default-settings
|
|||
|
```
|
|||
|
|
|||
|
#### <20><><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD><C2B2><EFBFBD><EFBFBD><EFBFBD>`tag_name`<60><>ֵ`${{ steps.tag.outputs.release_tag }}`
|
|||
|
```yaml
|
|||
|
- name: Upload firmware to release
|
|||
|
uses: softprops/action-gh-release@v1
|
|||
|
if: steps.tag.outputs.status == 'success' && !cancelled()
|
|||
|
env:
|
|||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|||
|
with:
|
|||
|
tag_name: ${{ steps.tag.outputs.release_tag }}
|
|||
|
body_path: release.txt
|
|||
|
files: ${{ env.FIRMWARE }}/*
|
|||
|
```
|
|||
|
|
|||
|
#### <20><><EFBFBD><EFBFBD>Ϊ`${{ env.RELEASE_TAG }}`
|
|||
|
```yaml
|
|||
|
- name: Upload firmware to release
|
|||
|
uses: softprops/action-gh-release@v1
|
|||
|
if: steps.tag.outputs.status == 'success' && !cancelled()
|
|||
|
env:
|
|||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|||
|
with:
|
|||
|
tag_name: ${{ env.RELEASE_TAG }}
|
|||
|
body_path: release.txt
|
|||
|
files: ${{ env.FIRMWARE }}/*
|
|||
|
```
|
|||
|
|
|||
|
#### Ҳ<><D2B2><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD>ĺõ<C4BA>actions
|
|||
|
[Actions-OpenWrt](https://github.com/sundaqiang/Actions-OpenWrt)
|
|||
|
|
|||
|
### Ч<><D0A7>չʾ
|
|||
|
![easyupdate][1]
|
|||
|
|
|||
|
[1]: https://raw.githubusercontent.com/sundaqiang/openwrt-packages/master/img/easyupdate.png
|