mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
Merge branch 'master' of github.com:naiba/nezha
This commit is contained in:
commit
32cb05e8cd
35
.github/workflows/dashboard.yml
vendored
35
.github/workflows/dashboard.yml
vendored
@ -23,22 +23,39 @@ jobs:
|
||||
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
|
||||
|
||||
- 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div align="center">
|
||||
<img width="500" style="max-width:100%" src="resource/static/brand.png" title="哪吒监控">
|
||||
<br><br>
|
||||
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.8.6&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.6.3-brightgreen?style=for-the-badge&logo=linux">
|
||||
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.8.6&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.6.4-brightgreen?style=for-the-badge&logo=linux">
|
||||
<br>
|
||||
<br>
|
||||
<p>:trollface: <b>哪吒监控</b> 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。</p>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user