Skip to content

Commit 4a223b0

Browse files
authored
Merge pull request #196 from Waujito/openwrt_2410_workflow
Workflow support for openwrt 25.12
2 parents ec242d0 + 7d336a3 commit 4a223b0

3 files changed

Lines changed: 68 additions & 30 deletions

File tree

.github/workflows/build-ci.yml

Lines changed: 63 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
sha: ${{ steps.gh.outputs.sha }}
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525

2626
- name: GH
2727
id: gh
@@ -49,10 +49,10 @@ jobs:
4949
branch: [latest-stable]
5050
steps:
5151
- name: Checkout
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@v6
5353

5454
- name: Set up ccache
55-
uses: actions/cache@v4
55+
uses: actions/cache@v5
5656
with:
5757
path: ${{ github.workspace }}/.ccache
5858
key: ccache-${{ matrix.arch }}-${{ github.run_id }}
@@ -93,7 +93,7 @@ jobs:
9393
9494
- name: Upload artifacts
9595
if: steps.build.outcome == 'success'
96-
uses: actions/upload-artifact@v4
96+
uses: actions/upload-artifact@v6
9797
with:
9898
name: youtubeUnblock-static-${{ matrix.arch }}
9999
path: ./**/youtubeUnblock*.tar.gz
@@ -121,7 +121,7 @@ jobs:
121121
tool: armv7-unknown-linux-musleabi
122122
steps:
123123
- name: Checkout
124-
uses: actions/checkout@v4
124+
uses: actions/checkout@v6
125125

126126
- name: Set up build tools
127127
env:
@@ -156,7 +156,7 @@ jobs:
156156
157157
- name: Upload artifacts
158158
if: steps.build.outcome == 'success'
159-
uses: actions/upload-artifact@v4
159+
uses: actions/upload-artifact@v6
160160
with:
161161
name: youtubeUnblock-static-${{ matrix.arch }}
162162
path: ./**/youtubeUnblock*.tar.gz
@@ -168,6 +168,12 @@ jobs:
168168
matrix:
169169
branch:
170170
- openwrt-24.10
171+
- openwrt-25.12
172+
include:
173+
- branch: openwrt-25.12
174+
package_extension: apk
175+
- branch: openwrt-24.10
176+
package_extension: ipk
171177
arch:
172178
- aarch64_cortex-a53
173179
- aarch64_cortex-a72
@@ -194,12 +200,15 @@ jobs:
194200
- mipsel_74kc
195201
- mipsel_mips32
196202
- x86_64
203+
exclude:
204+
- branch: openwrt-25.12
205+
arch: mips_4kec
197206
container:
198207
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
199208
options: --user root
200209
steps:
201210
- name: Checkout
202-
uses: actions/checkout@v4
211+
uses: actions/checkout@v6
203212
with:
204213
ref: 'openwrt'
205214

@@ -209,7 +218,8 @@ jobs:
209218
RELEASE: ${{ needs.prepare.outputs.release }}
210219
SHA: ${{ needs.prepare.outputs.sha }}
211220
run: |
212-
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile
221+
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION/;s/PKG_RELEASE:=.*$/PKG_RELEASE:=$RELEASE/;" youtubeUnblock/Makefile
222+
213223
214224
- name: Initilalize SDK
215225
id: init_sdk
@@ -221,6 +231,15 @@ jobs:
221231
run: |
222232
HOME=/builder ./setup.sh
223233
234+
- name: Add signing key
235+
if: matrix.package_extension == 'apk'
236+
id: signing_key
237+
env:
238+
SIGNING_KEY: ${{ secrets.EC_PRIVATE_KEY }}
239+
working-directory: /builder
240+
run: |
241+
([ -n "$SIGNING_KEY" ] && echo "$SIGNING_KEY" > private-key.pem) || true
242+
224243
- name: Build packages
225244
id: build
226245
env:
@@ -235,36 +254,40 @@ jobs:
235254
./scripts/feeds install -a -p youtubeUnblock
236255
make defconfig
237256
make package/youtubeUnblock/compile V=s
238-
mv $(find ./bin -type f -name 'youtubeUnblock*.ipk') ./youtubeUnblock-$VERSION-$RELEASE-$SHA-${{ matrix.arch }}-${{ matrix.branch }}.ipk
257+
mv $(find ./bin -type f -name "youtubeUnblock*.${{ matrix.package_extension }}") ./youtubeUnblock-$VERSION-$RELEASE-$SHA-${{ matrix.arch }}-${{ matrix.branch }}.${{ matrix.package_extension }}
239258
240259
- name: Upload packages
241260
if: steps.build.outcome == 'success'
242-
uses: actions/upload-artifact@v4
261+
uses: actions/upload-artifact@v6
243262
with:
244263
name: youtubeUnblock-${{ matrix.branch }}-${{ matrix.arch }}
245-
path: /builder/youtubeUnblock*.ipk
264+
path: /builder/youtubeUnblock*.${{ matrix.package_extension }}
246265
if-no-files-found: error
247266

248267
build-openwrt-luci:
249268
needs: prepare
250269
runs-on: ubuntu-latest
270+
strategy:
271+
matrix:
272+
branch:
273+
- openwrt-24.10
274+
- openwrt-25.12
275+
arch:
276+
- x86_64
277+
include:
278+
- branch: openwrt-25.12
279+
package_extension: apk
280+
- branch: openwrt-24.10
281+
package_extension: ipk
251282
container:
252-
image: openwrt/sdk:x86_64-openwrt-24.10
283+
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
253284
options: --user root
254285
steps:
255286
- name: Checkout
256-
uses: actions/checkout@v4
287+
uses: actions/checkout@v6
257288
with:
258289
ref: 'openwrt'
259290

260-
- name: Prepare build
261-
env:
262-
VERSION: ${{ needs.prepare.outputs.version }}
263-
RELEASE: ${{ needs.prepare.outputs.release }}
264-
SHA: ${{ needs.prepare.outputs.sha }}
265-
run: |
266-
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile
267-
268291
- name: Initilalize SDK
269292
id: init_sdk
270293
env:
@@ -275,6 +298,15 @@ jobs:
275298
run: |
276299
HOME=/builder ./setup.sh
277300
301+
- name: Add signing key
302+
if: matrix.package_extension == 'apk'
303+
id: signing_key
304+
env:
305+
SIGNING_KEY: ${{ secrets.EC_PRIVATE_KEY }}
306+
working-directory: /builder
307+
run: |
308+
([ -n "$SIGNING_KEY" ] && echo "$SIGNING_KEY" > private-key.pem) || true
309+
278310
- name: Build packages
279311
id: build
280312
env:
@@ -289,14 +321,14 @@ jobs:
289321
./scripts/feeds install -a -p youtubeUnblock
290322
make defconfig
291323
make package/luci-app-youtubeUnblock/compile V=s
292-
mv $(find ./bin -type f -name 'luci-app-youtubeUnblock*.ipk') ./luci-app-youtubeUnblock-$VERSION-$RELEASE-$SHA.ipk
324+
mv $(find ./bin -type f -name 'luci-app-youtubeUnblock*.${{ matrix.package_extension }}') ./luci-app-youtubeUnblock-$VERSION-$RELEASE-$SHA.${{ matrix.package_extension }}
293325
294326
- name: Upload packages
295327
if: steps.build.outcome == 'success'
296-
uses: actions/upload-artifact@v4
328+
uses: actions/upload-artifact@v6
297329
with:
298-
name: luci-app-youtubeUnblock
299-
path: /builder/luci-app-youtubeUnblock*.ipk
330+
name: luci-app-youtubeUnblock-${{ matrix.branch }}
331+
path: /builder/luci-app-youtubeUnblock*.${{ matrix.package_extension }}
300332
if-no-files-found: error
301333

302334
build-entware:
@@ -317,7 +349,7 @@ jobs:
317349
options: --user root
318350
steps:
319351
- name: Checkout
320-
uses: actions/checkout@v4
352+
uses: actions/checkout@v6
321353
with:
322354
ref: 'openwrt'
323355

@@ -327,7 +359,7 @@ jobs:
327359
RELEASE: ${{ needs.prepare.outputs.release }}
328360
SHA: ${{ needs.prepare.outputs.sha }}
329361
run: |
330-
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblockEntware/Makefile
362+
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION/;s/PKG_RELEASE:=.*$/PKG_RELEASE:=$RELEASE/;" youtubeUnblockEntware/Makefile
331363
332364
- name: Build packages
333365
id: build
@@ -348,7 +380,7 @@ jobs:
348380
349381
- name: Upload packages
350382
if: steps.build.outcome == 'success'
351-
uses: actions/upload-artifact@v4
383+
uses: actions/upload-artifact@v6
352384
with:
353385
name: youtubeUnblock-entware-${{ matrix.arch }}
354386
path: /home/me/Entware/youtubeUnblock*.ipk
@@ -362,7 +394,7 @@ jobs:
362394
runs-on: ubuntu-latest
363395
steps:
364396
- name: Download artifacts
365-
uses: actions/download-artifact@v4
397+
uses: actions/download-artifact@v6
366398

367399
- name: Upload assets
368400
uses: slord399/action-automatic-releases@v1.0.1
@@ -374,5 +406,7 @@ jobs:
374406
title: 'Development build'
375407
files: |
376408
./**/youtubeUnblock*.ipk
409+
./**/youtubeUnblock*.apk
377410
./**/youtubeUnblock*.tar.gz
378411
./**/luci-app-youtubeUnblock*.ipk
412+
./**/luci-app-youtubeUnblock*.apk

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ On both OpenWRT and Entware install the program with opkg. If you got read-only
7373

7474
When you got the release package, you should install it. Go to your router interface, to *System->Software*, do *Update lists* and install youtubeUnblock via *install_package* button. Then, you should go to *System-Startup* menu and reload the firewall (You may also do it within *Services->youtubeUnblock* menu).
7575

76-
Since OpenWRT **main** branch switched to apk instead of opkg, but this is not released yet, here is not deploys for apk in **Releases**. But **apk is supported** in PR #196.
76+
Since OpenWRT **main** branch switched to apk instead of opkg, but this is not released yet, here is not deploys for apk in **Releases**. But **apk is supported** in PR #196. Note, that if you are on **24.10** you will get **UNTRUSTED SIGNATURE** error. Put youtubeUnblock.pem to `/etc/apk/keys/` or install youtubeUnblock with `--allow-untrusted` flag `apk add youtubeUnblock*.apk --allow-untrusted`.
7777

7878
To make it work you should register an iptables rule and install required kernel modules. The list of modules depends on the version of OpenWRT and which firewall do you use (iptables or nftables). For most modern versions of OpenWRT (v23.x, v22.x) you should use nftables rules, for older ones it depends, but typically iptables.
7979

youtubeUnblock.pem

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoeHyI7xqf2Y5weRscJxUy/BRoKqT
3+
2dE9xFsZ2HKBTd2UMMkOwca+/BDXRZlxWGvcVNhDyLY9VGnZniF2JaH+Fw==
4+
-----END PUBLIC KEY-----

0 commit comments

Comments
 (0)