mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
Update openwrt-ci.yml (#4254)
This commit is contained in:
parent
593d812a47
commit
ce326f078b
45
.github/workflows/openwrt-ci.yml
vendored
45
.github/workflows/openwrt-ci.yml
vendored
@ -12,22 +12,22 @@ name: OpenWrt-CI
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 20 * * *
|
- cron: 0 20 * * *
|
||||||
watch:
|
push:
|
||||||
types: started
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build_openwrt:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
name: Build OpenWrt and release
|
||||||
if: github.event.repository.owner.id == github.event.sender.id
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: master
|
ref: master
|
||||||
fetch-depth: 1000000
|
|
||||||
|
|
||||||
- name: Space cleanup
|
- name: Space cleanup
|
||||||
env:
|
env:
|
||||||
@ -41,15 +41,6 @@ jobs:
|
|||||||
sudo -E apt-get -y autoremove --purge
|
sudo -E apt-get -y autoremove --purge
|
||||||
sudo -E apt-get clean
|
sudo -E apt-get clean
|
||||||
|
|
||||||
# 利用挂载在 /mnt/ 的 14G 额外空间:
|
|
||||||
# sudo mkdir -p -m 777 /mnt/openwrt/bin /mnt/openwrt/build_dir/host /mnt/openwrt/build_dir/hostpkg /mnt/openwrt/dl /mnt/openwrt/feeds /mnt/openwrt/staging_dir
|
|
||||||
# ln -s /mnt/openwrt/bin ./bin
|
|
||||||
# mkdir -p ./build_dir/host && ln -s /mnt/openwrt/build_dir/host ./build_dir/host
|
|
||||||
# mkdir -p ./build_dir/host && ln -s /mnt/openwrt/build_dir/hostpkg ./build_dir/hostpkg
|
|
||||||
# ln -s /mnt/openwrt/dl ./dl
|
|
||||||
# ln -s /mnt/openwrt/feeds ./feeds
|
|
||||||
# ln -s /mnt/openwrt/staging_dir ./staging_dir
|
|
||||||
|
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
- name: Update feeds
|
- name: Update feeds
|
||||||
@ -85,3 +76,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: OpenWrt_firmware
|
name: OpenWrt_firmware
|
||||||
path: ./bin/targets/
|
path: ./bin/targets/
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
if: github.event == 'push'
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload release asset
|
||||||
|
if: github.event == 'push'
|
||||||
|
id: upload-release-asset
|
||||||
|
uses: actions/upload-release-asset@v1.0.2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./bin/targets/*/*/
|
||||||
|
Loading…
Reference in New Issue
Block a user