Skip to content

Commit 2a901a6

Browse files
committed
Add github workflow
1 parent ad36252 commit 2a901a6

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/master.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build
2+
on:
3+
schedule:
4+
- cron: '0 3 * * *'
5+
workflow_dispatch:
6+
7+
jobs:
8+
buildroot:
9+
name: Firmware
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
platform:
16+
- ssc325de_lite_imou-c22ep-s2
17+
- ssc333_lite_tp-link-tapo-c110
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
23+
- name: Prepare
24+
run: |
25+
echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts
26+
echo "8.8.8.8 distfiles.dereferenced.org" | sudo tee -a /etc/hosts
27+
28+
- name: Build
29+
run: |
30+
export GIT_HASH=$(git rev-parse --short ${GITHUB_SHA})
31+
export GIT_BRANCH=${GITHUB_REF_NAME}
32+
33+
NAME=${{matrix.platform}}
34+
bash builder.sh ${NAME}
35+
36+
NORFW=$(find ${GITHUB_WORKSPACE}/openipc/output/images -name openipc*nor*)
37+
if [ ! -z ${NORFW} ]; then
38+
mv ${NORFW} ${NAME}-nor.tgz
39+
echo NORFW=${GITHUB_WORKSPACE}/${NAME}-nor.tgz >> ${GITHUB_ENV}
40+
fi
41+
42+
NANDFW=$(find ${GITHUB_WORKSPACE}/openipc/output/images -name openipc*nand*)
43+
if [ ! -z ${NANDFW} ]; then
44+
mv ${NANDFW} ${NAME}-nand.tgz
45+
echo NANDFW=${GITHUB_WORKSPACE}/${NAME}-nand.tgz >> ${GITHUB_ENV}
46+
fi
47+
48+
- name: Upload
49+
uses: softprops/action-gh-release@v1
50+
with:
51+
tag_name: latest
52+
files: |
53+
${{env.NORFW}}
54+
${{env.NANDFW}}

0 commit comments

Comments
 (0)