From eeb6b73141841570da7aacf587426999a5ee6ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=96=E5=A5=B3=E5=AD=A9=E7=9A=84=E5=B0=8F=E7=81=AB?= =?UTF-8?q?=E6=9F=B4?= <44471469+Erope@users.noreply.github.com> Date: Thu, 8 Jul 2021 01:54:44 +0800 Subject: [PATCH 1/4] Update dashboard.yml --- .github/workflows/dashboard.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index 6940ccd..bcf59c4 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -22,12 +22,27 @@ jobs: run: | echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin echo "${{ secrets.ALI_PAT }}" | docker login registry.cn-shanghai.aliyuncs.com -u ${{ secrets.ALI_USER }} --password-stdin - - - name: Build dasbboard image + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Code Test run: | go env - go test -v ./... - docker build -t nezha-dasbboard -f Dockerfile . + go test -v ./... + + - name: Build dasbboard image + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64,linux/arm + push: false + tags: nezha-dasbboard + - name: Push dasbboard image run: | GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') @@ -39,6 +54,7 @@ jobs: docker tag nezha-dasbboard $ALI_IMAGE_NAME docker push $GHRC_IMAGE_NAME docker push $ALI_IMAGE_NAME + - name: Purge jsdelivr cache run: | curl -s https://purge.jsdelivr.net/gh/${{ github.repository_owner }}/nezha@master/script/install.sh From a638fc879a5552a2c0d47908766bcfa16195d464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=96=E5=A5=B3=E5=AD=A9=E7=9A=84=E5=B0=8F=E7=81=AB?= =?UTF-8?q?=E6=9F=B4?= <44471469+Erope@users.noreply.github.com> Date: Thu, 8 Jul 2021 02:35:23 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ARM=E7=9A=84dashboard?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dashboard.yml | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index bcf59c4..d200152 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -33,27 +33,27 @@ jobs: run: | go env go test -v ./... - - - name: Build dasbboard image + + - name: Set up image name + run: | + GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') + if [ ${{ github.repository_owner }} = "naiba" ] + then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard") + else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') + fi + echo "::set-env name=GHRC_IMAGE_NAME::$GHRC_IMAGE_NAME" + echo "::set-env name=ALI_IMAGE_NAME::$ALI_IMAGE_NAME" + + - name: Build dasbboard image And Push uses: docker/build-push-action@v2 with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm - push: false - tags: nezha-dasbboard - - - name: Push dasbboard image - run: | - GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') - if [ ${{ github.repository_owner }} = "naiba" ] - then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard") - else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') - fi - docker tag nezha-dasbboard $GHRC_IMAGE_NAME - docker tag nezha-dasbboard $ALI_IMAGE_NAME - docker push $GHRC_IMAGE_NAME - docker push $ALI_IMAGE_NAME + platforms: linux/amd64,linux/arm64,linux/arm,linux/386 + push: true + tags: | + ${{ GHRC_IMAGE_NAME }} + ${{ ALI_IMAGE_NAME }} - name: Purge jsdelivr cache run: | From 7e42ca8760dfd0acd4c6b0abe4a354d9d42c3612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=96=E5=A5=B3=E5=AD=A9=E7=9A=84=E5=B0=8F=E7=81=AB?= =?UTF-8?q?=E6=9F=B4?= <44471469+Erope@users.noreply.github.com> Date: Thu, 8 Jul 2021 02:38:35 +0800 Subject: [PATCH 3/4] Update dashboard.yml --- .github/workflows/dashboard.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index d200152..b231e44 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -41,9 +41,10 @@ jobs: then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard") else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]') fi - echo "::set-env name=GHRC_IMAGE_NAME::$GHRC_IMAGE_NAME" - echo "::set-env name=ALI_IMAGE_NAME::$ALI_IMAGE_NAME" - + echo "::set-output name=GHRC_IMAGE_NAME::$GHRC_IMAGE_NAME" + echo "::set-output name=ALI_IMAGE_NAME::$ALI_IMAGE_NAME" + id: image-name + - name: Build dasbboard image And Push uses: docker/build-push-action@v2 with: @@ -52,8 +53,8 @@ jobs: platforms: linux/amd64,linux/arm64,linux/arm,linux/386 push: true tags: | - ${{ GHRC_IMAGE_NAME }} - ${{ ALI_IMAGE_NAME }} + ${{ steps.image-name.outputs.GHRC_IMAGE_NAME }} + ${{ steps.image-name.outputs.ALI_IMAGE_NAME }} - name: Purge jsdelivr cache run: | From b0a37720089c3b9194912b2b947545d84b8c821e Mon Sep 17 00:00:00 2001 From: Erope Date: Thu, 8 Jul 2021 03:04:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=94=AF=E6=8C=81ARM=E5=92=8Cx86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- script/install.sh | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7a32939..f4d90d2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@


-    +   

:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。

diff --git a/script/install.sh b/script/install.sh index 27fa956..c95fe6c 100755 --- a/script/install.sh +++ b/script/install.sh @@ -11,7 +11,7 @@ NZ_BASE_PATH="/opt/nezha" NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard" NZ_AGENT_PATH="${NZ_BASE_PATH}/agent" NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service" -NZ_VERSION="v0.6.3" +NZ_VERSION="v0.6.4" red='\033[0;31m' green='\033[0;32m' @@ -134,11 +134,6 @@ install_dashboard() { echo -e "> 安装面板" - if [[ $(uname -m | grep 'arm\|aarch') != "" ]]; then - echo "面板目前不支持在 arm 环境下安装" - exit 1 - fi - # 哪吒监控文件夹 mkdir -p $NZ_DASHBOARD_PATH chmod 777 -R $NZ_DASHBOARD_PATH