diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index 6940ccd461..b231e443d6 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -22,23 +22,40 @@ 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 . - - name: Push dasbboard image + go test -v ./... + + - 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:]') + 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 + 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: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64,linux/arm,linux/386 + push: true + tags: | + ${{ steps.image-name.outputs.GHRC_IMAGE_NAME }} + ${{ steps.image-name.outputs.ALI_IMAGE_NAME }} + - name: Purge jsdelivr cache run: | curl -s https://purge.jsdelivr.net/gh/${{ github.repository_owner }}/nezha@master/script/install.sh diff --git a/README.md b/README.md index 7a32939e0b..f4d90d2a5d 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 27fa9567a3..c95fe6c06f 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