Skip to content

Commit 0703d6f

Browse files
committed
update actions
1 parent 19f049c commit 0703d6f

3 files changed

Lines changed: 8 additions & 16 deletions

File tree

.github/workflows/NanoPi-Build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ on:
2929
options:
3030
- '21.02'
3131
- '22.03'
32+
- 'master'
3233
model_R4S:
3334
description: 'Build R4S'
3435
type: boolean
@@ -40,7 +41,7 @@ on:
4041
model_R2C:
4142
description: 'Build R2C'
4243
type: boolean
43-
default: true
44+
default: false
4445
jobs:
4546
init:
4647
runs-on: ubuntu-22.04
@@ -53,18 +54,18 @@ jobs:
5354
matrix: ${{ steps.build_matrix.outputs.matrix }}
5455
steps:
5556
- id: gen_build_string
56-
run: echo "::set-output name=build_string::$(date +%Y.%m.%d)"
57+
run: echo "build_string=$(date +%Y.%m.%d)" >> $GITHUB_OUTPUT
5758
- id: gen_release_tag
58-
run: echo "::set-output name=release_tag::$(date +%Y%m%d)"
59+
run: echo "release_tag=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
5960
- id: build_matrix
6061
run: |
6162
model_R4S="${{ fromJSON('["", "R4S"]')[github.event.inputs.model_R4S == 'true'] }}"
6263
model_R2S="${{ fromJSON('["", "R2S"]')[github.event.inputs.model_R2S == 'true'] }}"
63-
model_R2C="${{ fromJSON('["", "R2C"]')[github.event.inputs.model_R2C == 'true'] }}"
64+
model_R2C="${{ fromJSON('["", "R2C"]')[github.event.inputs.model_R2C == 'true' && (github.event.inputs.openwrt_branch == '21.02' || github.event.inputs.openwrt_branch == '22.03')] }}"
6465
models="$model_R4S $model_R2S $model_R2C"
6566
modelsJson=$(echo -n "$models" | jq -R -s -c 'split(" ") | map(select(length>0))')
6667
matrix="{\"nanopi_model\":$modelsJson}"
67-
echo "::set-output name=matrix::$matrix"
68+
echo "matrix=$matrix" >> $GITHUB_OUTPUT
6869
6970
build:
7071
needs: init
@@ -270,7 +271,7 @@ jobs:
270271

271272
- name: Create release
272273
id: create_release
273-
uses: ncipollo/release-action@v1.9.0
274+
uses: ncipollo/release-action@v1.11.1
274275
if: ${{ !cancelled() }}
275276
with:
276277
name: OpenWrt ${{ env.OPENWRT_BRANCH }} ${{ env.BUILD_STRING }}
@@ -280,4 +281,4 @@ jobs:
280281
replacesArtifacts: true
281282
token: ${{ secrets.GITHUB_TOKEN }}
282283
bodyFile: "openwrt-${{ env.OPENWRT_BRANCH }}/release-info.md"
283-
artifacts: ./artifact/*.zip
284+
artifacts: ./artifact/*.gz

openwrt-21.02/steps/organize_files.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,3 @@ mv openwrt-rockchip-armv8-friendlyarm_nanopi-$NANOPI_MODEL_LOW-squashfs-sysupgra
2222
gzip -d *.gz && exit 0
2323
gzip --best *.img
2424
ls -Ahl
25-
zip OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-ext4.zip *$VARIANT*ext4*
26-
zip OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-squashfs.zip *$VARIANT*squashfs*
27-
#cp ../build/openwrt/*.config ./
28-
ls -Ahl
29-

openwrt-22.03/steps/organize_files.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,4 @@ mv openwrt-rockchip-armv8-friendlyarm_nanopi-$NANOPI_MODEL_LOW-squashfs-sysupgra
2222
gzip -d *.gz && exit 0
2323
gzip --best *.img
2424
ls -Ahl
25-
zip OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-ext4.zip *$VARIANT*ext4*
26-
zip OpenWrt-AO-NanoPi$NANOPI_MODEL-$VARIANT-$OPENWRT_BRANCH-$RELTAG-squashfs.zip *$VARIANT*squashfs*
27-
#cp ../build/openwrt/*.config ./
28-
ls -Ahl
2925

0 commit comments

Comments
 (0)