Update workflow for openwrt 24.10

This commit is contained in:
Vadim Vetrov
2024-11-30 17:22:44 +03:00
parent 6c3ed7e5e9
commit 4761034802

View File

@@ -168,6 +168,13 @@ jobs:
matrix: matrix:
branch: branch:
- openwrt-23.05 - openwrt-23.05
- SNAPSHOT
include:
- branch: SNAPSHOT
package_extension: apk
- branch: openwrt-23.05
package_extension: ipk
arch: arch:
- aarch64_cortex-a53 - aarch64_cortex-a53
- aarch64_cortex-a72 - aarch64_cortex-a72
@@ -195,6 +202,9 @@ jobs:
- mipsel_74kc - mipsel_74kc
- mipsel_mips32 - mipsel_mips32
- x86_64 - x86_64
exclude:
- branch: SNAPSHOT
arch: arm_mpcore
container: container:
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }} image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
options: --user root options: --user root
@@ -210,7 +220,8 @@ jobs:
RELEASE: ${{ needs.prepare.outputs.release }} RELEASE: ${{ needs.prepare.outputs.release }}
SHA: ${{ needs.prepare.outputs.sha }} SHA: ${{ needs.prepare.outputs.sha }}
run: | 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/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION/;s/PKG_RELEASE:=.*$/PKG_RELEASE:=$RELEASE/;" youtubeUnblock/Makefile
- name: Initilalize SDK - name: Initilalize SDK
id: init_sdk id: init_sdk
@@ -222,6 +233,15 @@ jobs:
run: | run: |
HOME=/builder ./setup.sh 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 - name: Build packages
id: build id: build
env: env:
@@ -236,14 +256,14 @@ jobs:
./scripts/feeds install -a -p youtubeUnblock ./scripts/feeds install -a -p youtubeUnblock
make defconfig make defconfig
make package/youtubeUnblock/compile V=s 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 - name: Upload packages
if: steps.build.outcome == 'success' if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: youtubeUnblock-${{ matrix.branch }}-${{ matrix.arch }} name: youtubeUnblock-${{ matrix.branch }}-${{ matrix.arch }}
path: /builder/youtubeUnblock*.ipk path: /builder/youtubeUnblock*.${{ matrix.package_extension }}
if-no-files-found: error if-no-files-found: error
build-openwrt-luci: build-openwrt-luci:
@@ -258,14 +278,6 @@ jobs:
with: with:
ref: 'openwrt' ref: 'openwrt'
- 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
- name: Initilalize SDK - name: Initilalize SDK
id: init_sdk id: init_sdk
env: env:
@@ -328,7 +340,7 @@ jobs:
RELEASE: ${{ needs.prepare.outputs.release }} RELEASE: ${{ needs.prepare.outputs.release }}
SHA: ${{ needs.prepare.outputs.sha }} SHA: ${{ needs.prepare.outputs.sha }}
run: | run: |
sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblockEntware/Makefile sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION/;s/PKG_RELEASE:=.*$/PKG_RELEASE:=$RELEASE/;" youtubeUnblockEntware/Makefile
- name: Build packages - name: Build packages
id: build id: build