Skip to content

Update config_common #974

Update config_common

Update config_common #974

Workflow file for this run

#
# This is free software, license use GPLv3.
#
# Copyright (c) 2020, Chuck <fanck0605@qq.com>
#
name: openwrt-22.03
on:
push:
branches: [ openwrt-22.03 ]
tags:
- v22.03.*
pull_request:
branches: [ openwrt-22.03 ]
jobs:
build:
strategy:
matrix:
target: [ x86-64, nanopi-r2s ]
runs-on: ubuntu-22.04
steps:
- name: Set timezone
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Asia/Shanghai"
timezoneMacos: "Asia/Shanghai"
timezoneWindows: "China Standard Time"
- name: Checkout Project
uses: actions/checkout@v4
with:
ref: openwrt-22.03
- name: Show large directories
run: |
df -h
sudo du -xh --exclude=/{proc,sys,dev} / | grep -E '^[0-9.]*?[GTPEZY]'
- name: Initialize Environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo rm -rf /usr/local/lib/android
sudo apt-get update
sudo apt-get install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libelf-dev libncurses-dev libssl-dev python3-distutils quilt rsync subversion unzip zlib1g-dev file wget
sudo apt-get autoremove --purge
sudo apt-get clean
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Show disk space usage
run: |
df -h
- name: Build OpenWrt
run: |
./build.sh -t ${{ matrix.target }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: openwrt-${{ matrix.target }}
path: artifact
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v4
- name: Create release tarball
run: |
release_version=${GITHUB_REF_NAME#v}
echo "RELEASE_VERSION=$release_version" >>"$GITHUB_ENV"
for artifact in openwrt-*; do
pushd "$artifact"
tar -zcf ../openwrt-"$release_version"-"${artifact#openwrt-}".tar.gz *
popd
done
- uses: softprops/action-gh-release@v1
with:
files: openwrt-${{ env.RELEASE_VERSION }}-*.tar.gz