Skip to content

Commit

Permalink
Update workflow for openwrt 24.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Waujito committed Nov 30, 2024
1 parent 532f7ee commit 9c825fd
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ jobs:
matrix:
branch:
- openwrt-23.05
- SNAPSHOT
include:
- branch: SNAPSHOT
package_extension: apk
- branch: openwrt-23.05
package_extension: ipk

arch:
- aarch64_cortex-a53
- aarch64_cortex-a72
Expand Down Expand Up @@ -194,22 +201,25 @@ jobs:
- mipsel_74kc
- mipsel_mips32
- x86_64
exclude:
- branch: SNAPSHOT
arch: arm_mpcore
container:
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'openwrt'
ref: 'openwrt_2410'

- name: Prepare build
env:
VERSION: ${{ needs.prepare.outputs.version }}
RELEASE: ${{ needs.prepare.outputs.release }}
SHA: ${{ needs.prepare.outputs.sha }}
run: |
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/" youtubeUnblock/Makefile
- name: Initilalize SDK
id: init_sdk
Expand All @@ -221,6 +231,15 @@ jobs:
run: |
HOME=/builder ./setup.sh
- name: Add signing key
if: matrix.package_extension == 'apk'
id: signing_key
env:
SIGNING_KEY: ${{ secrets.EC_PRIVATE_KEY }}
working-directory: /builder
run: |
([ -n "$SIGNING_KEY" ] && echo "$SIGNING_KEY" > private-key.pem) || true
- name: Build packages
id: build
env:
Expand All @@ -235,14 +254,14 @@ jobs:
./scripts/feeds install -a -p youtubeUnblock
make defconfig
make package/youtubeUnblock/compile V=s
mv $(find ./bin -type f -name 'youtubeUnblock*.ipk') ./youtubeUnblock-$VERSION-$RELEASE-$SHA-${{ matrix.arch }}-${{ matrix.branch }}.ipk
mv $(find ./bin -type f -name "youtubeUnblock*.${{ matrix.package_extension }}") ./youtubeUnblock-$VERSION-$RELEASE-$SHA-${{ matrix.arch }}-${{ matrix.branch }}.${{ matrix.package_extension }}
- name: Upload packages
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: youtubeUnblock-${{ matrix.branch }}-${{ matrix.arch }}
path: /builder/youtubeUnblock*.ipk
path: /builder/youtubeUnblock*.${{ matrix.package_extension }}
if-no-files-found: error

build-openwrt-luci:
Expand All @@ -255,15 +274,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'openwrt'
ref: 'openwrt_2410'

- name: Prepare build
env:
VERSION: ${{ needs.prepare.outputs.version }}
RELEASE: ${{ needs.prepare.outputs.release }}
SHA: ${{ needs.prepare.outputs.sha }}
run: |
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/" youtubeUnblock/Makefile
- name: Initilalize SDK
id: init_sdk
Expand Down Expand Up @@ -319,15 +338,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'openwrt'
ref: 'openwrt_2410'

- name: Prepare build
env:
VERSION: ${{ needs.prepare.outputs.version }}
RELEASE: ${{ needs.prepare.outputs.release }}
SHA: ${{ needs.prepare.outputs.sha }}
run: |
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/" youtubeUnblock/Makefile
- name: Build packages
id: build
Expand Down

0 comments on commit 9c825fd

Please sign in to comment.