add qualcommax-ipq60xx support #145
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: CI | |
on: | |
push: | |
branches: master | |
pull_request: | |
branches: master | |
workflow_dispatch: | |
inputs: | |
debug: | |
description: 'Whether to enable script debug log' | |
required: true | |
default: '0' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-20.04 | |
container: | |
image: pexcn/docker-images:buster-openwrt | |
env: | |
TZ: Asia/Taipei | |
DEBUG: ${{ github.event.inputs.debug }} | |
SDK_URL: ${{ matrix.SDK_URL }} | |
strategy: | |
fail-fast: false | |
matrix: | |
SDK_URL: | |
- https://downloads.openwrt.org/releases/21.02.5/targets/ath79/generic/openwrt-sdk-21.02.5-ath79-generic_gcc-8.4.0_musl.Linux-x86_64.tar.xz | |
- https://downloads.openwrt.org/releases/21.02.5/targets/ath79/tiny/openwrt-sdk-21.02.5-ath79-tiny_gcc-8.4.0_musl.Linux-x86_64.tar.xz | |
- https://downloads.openwrt.org/releases/21.02.5/targets/x86/64/openwrt-sdk-21.02.5-x86-64_gcc-8.4.0_musl.Linux-x86_64.tar.xz | |
- https://github.com/openwrt-ipq60xx/ci/releases/download/main/openwrt-sdk-qualcommax-ipq60xx_gcc-12.3.0_musl.Linux-x86_64.tar.xz | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Append environment variable | |
run: | | |
echo "IPK_ARCH=$(echo $SDK_URL | awk -F '/' '{print $7 "-" $8}')" >> $GITHUB_ENV | |
- name: Build | |
run: ./build.sh | |
- name: Push | |
if: github.event_name == 'push' | |
run: | | |
# update target packages | |
git clone https://github.com/${{ github.repository }}.git --single-branch -b $IPK_ARCH --depth 1 $IPK_ARCH | |
rm -rf $IPK_ARCH/* | |
mv $IPK_ARCH-base $IPK_ARCH/base | |
mv $IPK_ARCH-core $IPK_ARCH/core | |
# commit and push packages | |
cd $IPK_ARCH | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git add . | |
git commit -m "$(date '+%Y-%m-%d %H:%M:%S')" || true | |
git push https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git $IPK_ARCH |