Skip to content

OpenWrt main-sdk for Mediatek_mt7988a_bpi-r4 and release #430

OpenWrt main-sdk for Mediatek_mt7988a_bpi-r4 and release

OpenWrt main-sdk for Mediatek_mt7988a_bpi-r4 and release #430

Workflow file for this run

name: OpenWrt main-sdk for Mediatek_mt7988a_bpi-r4 and release
on:
workflow_dispatch:
env:
REMOTE_REPOSITORY: glassd00r/openwrt
REMOTE_BRANCH: main
CONFIG_FILE: bpi-r4.config
CUSTOM_FILES_PATH: files/
RELEASE_PREFIX: Openwrt_mtk_bpi-r4
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Build OpenWrt
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt full-upgrade -y
sudo apt install -y build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev python3-setuptools rsync swig unzip zlib1g-dev file wget
- name: Checkout remote repository
uses: actions/checkout@v4
with:
repository: ${{ env.REMOTE_REPOSITORY }}
ref: ${{ env.REMOTE_BRANCH }}
- name: Checkout current repository
uses: actions/checkout@v4
with:
path: "custom_repo"
- name: Update and install feeds
run: |
./scripts/feeds update -a
./scripts/feeds install -a
- name: Configure firmware image
run: |
mv custom_repo/${{ env.CONFIG_FILE }} .config
make defconfig
- name: Include custom files
run: |
mkdir -p ${{ env.CUSTOM_FILES_PATH }}
mv custom_repo/BPI-r4/${{ env.CUSTOM_FILES_PATH }}* ${{ env.CUSTOM_FILES_PATH }}
- name: Download dependencies
run: make -j$(($(nproc)+1)) download
- name: Build the firmware image
run: make -j$(($(nproc)+1)) world
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: filogic880-images
path: bin/targets/mediatek/filogic
release:
needs: build
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: filogic880-images
path: ./firmware
- name: Create Release
run: |
VERSION="${{ env.RELEASE_PREFIX }}-$(date +'%Y.%m.%d')"
# Check if the release already exists
if gh release view "$VERSION" &>/dev/null; then
gh release delete "$VERSION" --cleanup-tag -y
fi
# Create the new release
FILES_TO_UPLOAD=$(find ./firmware -maxdepth 1 -type f)
gh release create "$VERSION" $FILES_TO_UPLOAD \
--title "$VERSION"