OpenWrt main-sdk for Mediatek_mt7988a_bpi-r4 and release #43
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
name: Build OpenWrt 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: Mediatek_mt7988a_bpi-r4 | |
jobs: | |
build: | |
name: Build OpenWrt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y \ | |
build-essential clang flex bison g++ gawk gcc-multilib \ | |
g++-multilib gettext git libncurses-dev libssl-dev \ | |
python3-distutils rsync 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 -j$(nproc) | |
- 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: Build the firmware image | |
run: make download world V=s -j$(nproc) | |
- name: Package output | |
run: tar -cvf bpi_r4-images.tar bin/targets/mediatek/filogic | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bpi_r4-images | |
path: bpi_r4-images.tar | |
release: | |
name: Create release | |
needs: [build] | |
if: needs.build.result == 'success' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: bpi_r4-images | |
- name: Extract artifacts | |
run: tar xf bpi_r4-images.tar | |
- name: Get current date | |
run: echo "RELEASE_DATE=$(date +%F)" >> $GITHUB_ENV | |
- name: Create release | |
uses: softprops/action-gh-release@master | |
with: | |
files: bin/targets/mediatek/filogic/* | |
tag_name: ${{ env.RELEASE_PREFIX }}-${{ env.RELEASE_DATE }} | |
name: Openwrt BPI-r4 ${{ env.RELEASE_DATE }} | |
body: | | |
Updated prebuilt images for ${{ env.RELEASE_DATE }} | |
Build Commit: ${{ needs.check_commits.outputs.latest_commit_sha }} | |
- name: Clean up old releases | |
uses: dev-drprasad/delete-older-releases@master | |
with: | |
keep_latest: 5 | |
delete_tags: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |