更新Docker镜像名称为lkddi并改进环境变量处理

- 将Docker Hub仓库名从joestar817改为lkddi
- 更新start.py以使用环境变量并提供默认值
- 更新README.md中的仓库信息
This commit is contained in:
2025-12-02 17:55:08 +08:00
parent 845877c74a
commit 63cae9a680
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: | images: |
joestar817/dell-fans-controller-docker lkddi/dell-fans-controller-docker
harbor.ay.lc/library/dell-fans-controller harbor.ay.lc/library/dell-fans-controller
tags: | tags: |
type=ref,event=branch type=ref,event=branch
+1 -1
View File
@@ -32,7 +32,7 @@ docker run -d --name=dell-fans-controller-docker -e HOST=192.168.1.100 -e USERN
本项目通过 GitHub Actions 自动构建 Docker 镜像,并推送到 Docker Hub 和 Harbor 私有仓库。 本项目通过 GitHub Actions 自动构建 Docker 镜像,并推送到 Docker Hub 和 Harbor 私有仓库。
- Docker Hub: `joestar817/dell-fans-controller-docker:latest` - Docker Hub: `lkddi/dell-fans-controller:latest`
- Harbor: `harbor.ay.lc/library/dell-fans-controller:latest` - Harbor: `harbor.ay.lc/library/dell-fans-controller:latest`
镜像支持多架构 (linux/amd64, linux/arm64) 镜像支持多架构 (linux/amd64, linux/arm64)
+6 -6
View File
@@ -7,16 +7,16 @@ from controller.logger import logger
if __name__ == '__main__': if __name__ == '__main__':
host = "192.168.1.100" #os.getenv('HOST') │ host = os.getenv('HOST', "192.168.1.100")
username = "root" #os.getenv('USERNAME') │ username = os.getenv('USERNAME', "root")
password = "your_idrac_password" #os.getenv('PASSWORD') password = os.getenv('PASSWORD', "your_idrac_password")
if host is None: if not host:
raise RuntimeError('未设置 HOST 环境变量') raise RuntimeError('未设置 HOST 环境变量')
if username is None: if not username:
raise RuntimeError('未设置 USERNAME 环境变量') raise RuntimeError('未设置 USERNAME 环境变量')
if password is None: if not password:
raise RuntimeError('未设置 PASSWORD 环境变量') raise RuntimeError('未设置 PASSWORD 环境变量')
while True: while True: