build openwrt images #86
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Action to build openwrt images | |
--- | |
name: build openwrt images | |
on: | |
# Allows manual workflow run (must in default branch to work) | |
workflow_dispatch: | |
# Allows workflow be reusable | |
workflow_call: | |
inputs: | |
commit_long_sha: | |
required: true | |
type: string | |
# push: | |
# branches: | |
# - main | |
# paths: | |
# - 'custom-feed/**' | |
jobs: | |
build-openwrt-image: | |
strategy: | |
matrix: | |
image: | |
# W | |
- "x86 64 generic" | |
- "ath79 generic tplink_archer-c7-v4" | |
- "mediatek filogic xiaomi_mi-router-ax3000t-ubootmod" | |
# P | |
- "ramips mt7621 totolink_x5000r" | |
- "mediatek filogic bananapi_bpi-r3" | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repo from main if run from compare-release | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.commit_long_sha }} | |
- name: Build image | |
run: | | |
./openwrt-builder.sh ${{ matrix.image }} | |
- name: Prepare artifact name | |
run: | | |
echo "artifact_name=$(t="${{ matrix.image }}" && echo "${t##* }")" >> "$GITHUB_ENV" | |
- name: Upload openwrt image artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.artifact_name }} | |
path: openwrt.* |