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)