From 91a4ca17f10ba828f47a097728792889e7ea8e97 Mon Sep 17 00:00:00 2001 From: hootrix Date: Sat, 20 May 2023 12:49:51 +0800 Subject: [PATCH] CI/CD --- .github/workflows/main.yml | 3 ++- logger.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10bbb38..00ef5de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,8 @@ jobs: - name: Create version file run: | - echo "__version__ = '$(TZ='Asia/Shanghai' date +'%Y%m%d')'" > utils/__version__.py + COMMIT_ID=$(git rev-parse --short HEAD) + echo "__version__ = '$(TZ='Asia/Shanghai' date +'%Y%m%d').$COMMIT_ID'" > utils/__version__.py - name: Login to DockerHub diff --git a/logger.py b/logger.py index c6329ed..be167ab 100644 --- a/logger.py +++ b/logger.py @@ -20,6 +20,6 @@ logger = logging.getLogger('keyword_alert.root') logger.setLevel(__level) -logger.addHandler(handler) +logger.addHandler(handler)