Skip to content

NanoPi R1S-H5 OpenWrt Autobuild #45

NanoPi R1S-H5 OpenWrt Autobuild

NanoPi R1S-H5 OpenWrt Autobuild #45

Workflow file for this run

#=================================================
# Description: NanoPi R1S-H5 OpenWrt Autobuild
# Lisence: MIT
# Author: tjuyy
#=================================================
name: NanoPi R1S-H5 OpenWrt Autobuild
on:
release:
types: [published]
push:
branches:
- master
paths:
- ".config"
# schedule:
# - cron: 0 8 * * 5
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo -E apt-get update
sudo -E apt-get clean
sudo wget -O - https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | bash
sudo -E apt-get -y install bc
- name: Clone Lean's OpenWrt source code
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
run: git clone --depth 1 $REPO_URL -b $REPO_BRANCH lede
- name: Clone Friendlyarm's OpenWrt source code
run: |
git clone https://github.com/friendlyarm/repo
sudo cp repo/repo /usr/bin/
mkdir friendlywrt-h5
cd friendlywrt-h5
repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v18.06.1 -m h5.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle
repo sync -c --no-clone-bundle -j$(nproc)
- name: Merge upstearm OpenWrt source
run: |
cd friendlywrt-h5
rm -rf friendlywrt && mkdir friendlywrt && cd friendlywrt
git init
git config user.email [email protected]
git config user.name abc
git remote add origin https://github.com/friendlyarm/friendlywrt.git
git remote add upstream https://github.com/openwrt/openwrt.git
git pull origin master-v18.06.1
git pull upstream openwrt-18.06 --no-edit
- name: Merge Lean's OpenWrt source
run: |
cd friendlywrt-h5/friendlywrt
cp -r ../../lede/package/lean package/
sed -i 's/https:\/\/git.openwrt.org\/project\/luci.git;openwrt-18.06/https:\/\/github.com\/coolsnowwolf\/luci/' feeds.conf.default
sed -i 's/dnsmasq /dnsmasq-full luci/' include/target.mk
- name: Update and install feeds
run: |
cd friendlywrt-h5/friendlywrt
./scripts/feeds update -a
./scripts/feeds install -a
- name: SSH connection to Actions
uses: P3TERX/debugger-action@master
- name: Backup step, only run if previous step status check is failure
if: failure()
run: |
[ -e friendlywrt-h5/friendlywrt/.config ] || cp NanoPi-R1S-H5.config friendlywrt-h5/friendlywrt/.config
cat friendlywrt-h5/friendlywrt/.config
- name: Download package
if: always()
run: |
cd friendlywrt-h5/friendlywrt
make download -j8
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: Build
if: always()
run: |
cd friendlywrt-h5
echo "Start building..."
./build.sh nanopi_r1s.mk
- name: Zip Files
if: always()
run: |
find friendlywrt-h5/out/ -name "FriendlyWrt_*img*" | xargs -i zip -r {}.zip {}
- name: Assemble Artifact
if: always()
run: |
rm -rf ./artifact/
mkdir -p ./artifact/
find friendlywrt-h5/out/ -name "FriendlyWrt_*img.zip*" | xargs -i mv -f {} ./artifact/
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@master
with:
name: FriendlyWrt_NanoPi-R1S
path: ./artifact/