From aac120ffca3e3d3957e6b9bc901139e7435aa65b Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Thu, 6 Oct 2022 02:37:46 +0800 Subject: [PATCH] fix --- .../.github/workflows/build_openwrt_ipk.yaml | 62 +++++++++++++++++++ netmaker-openwrt/netmaker/Makefile | 14 ++--- 2 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 netmaker-openwrt/.github/workflows/build_openwrt_ipk.yaml diff --git a/netmaker-openwrt/.github/workflows/build_openwrt_ipk.yaml b/netmaker-openwrt/.github/workflows/build_openwrt_ipk.yaml new file mode 100644 index 000000000..86888ea0c --- /dev/null +++ b/netmaker-openwrt/.github/workflows/build_openwrt_ipk.yaml @@ -0,0 +1,62 @@ +name: 'Build docker image' +on: + # Auto build on push to main branch + push: + paths-ignore: + - “README.md” + - ".gitignore" + - "LICENSE" + branches: + - main + # Auto build @ every day 6:00am + schedule: + - cron: '0 6 * * *' +jobs: + openwrt-builder-ipk: + name: 'Build ipk for openwrt branches' + strategy: + matrix: + branch: ["openwrt-18.06", "openwrt-19.07", "openwrt-21.02", "master"] + runs-on: ubuntu-latest + # Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest + defaults: + run: + shell: bash + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - run: echo "Building ${{ matrix.branch }} branch." + + # Checkout the repository to the GitHub Actions runner + - name: 'Checkout the repository to the GitHub Actions runner' + uses: actions/checkout@v2 + + # Set up QEMU + - name: 'Set up QEMU' + uses: docker/setup-qemu-action@v1 + + # Login to DockerHub with username and token + - name: Login to DockerHub with username and token + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # Build image and push to DockerHub + - name: 'Build image DockerHub' + run: | + echo "Building ${{ matrix.branch }} branch." + + # build ipk + docker run -t --rm -e OPENWRT_BRANCH="${{ matrix.branch }}" -v `pwd`:/src sbilly/openwrt-builder:latest /bin/bash /src/scripts/build_ipk.sh ${{ matrix.branch }} + + # Upload release + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.TOKEN }} + file: bin/*.ipk + tag: ${{ github.ref }} + overwrite: true + file_glob: true \ No newline at end of file diff --git a/netmaker-openwrt/netmaker/Makefile b/netmaker-openwrt/netmaker/Makefile index 55544abba..903dd2beb 100644 --- a/netmaker-openwrt/netmaker/Makefile +++ b/netmaker-openwrt/netmaker/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2019 suyuan <175338101@qqcom> +# Copyright (C) 2019 sbilly # # This is free software, licensed under the MIT License. # See /LICENSE for more information. @@ -8,18 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netmaker -PKG_VERSION:=0.16.0 +PKG_VERSION:=0.9.4 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/gravitl/netmaker.git -PKG_SOURCE_VERSION:=db3288782965a7d4713cf271c1277957749802d1 -PKG_SOURCE_DATE:=20220930 +PKG_SOURCE_VERSION:=e9bce264719f88c30e252ecc754d08f422f4c080 +PKG_SOURCE_DATE:=20220117 PKG_MIRROR_HASH:=skip PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=suyuan <175338101@qqcom> +PKG_MAINTAINER:=sbilly PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 @@ -31,7 +31,7 @@ GO_PKG_EXCLUDES:=excluded GO_PKG_LDFLAGS:=-s -w include $(INCLUDE_DIR)/package.mk -include $(TOPDIR)/feeds/openmptcprouter/golang/golang-package.mk +include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk define Package/netmaker $(call Package/netmaker/Default) @@ -45,7 +45,7 @@ define Package/netmaker/Default TITLE:=Netmaker for OpenWRT URL:=https://github.com/gravitl/netmaker DEPENDS:=$(GO_ARCH_DEPENDS) - MAINTAINER:=suyuan <175338101@qqcom> + MAINTAINER:=sbilly endef define Package/netmaker/Default/description