From e241cc1e7a9315ed17c61b9f3bfe0eb188e46e1a Mon Sep 17 00:00:00 2001 From: Carlo Alberto Barbano Date: Sun, 23 Feb 2025 18:31:11 +0100 Subject: [PATCH 1/5] update event branches --- .github/workflows/build_image.yml | 3 +- .github/workflows/docker_build_push.yml | 40 ------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 .github/workflows/docker_build_push.yml diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index 475763b..c0c8a9b 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -4,8 +4,7 @@ on: push: branches: - master - - developement - - ptb-async + - development env: IMAGE_NAME: transcriberbot diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml deleted file mode 100644 index 230d48f..0000000 --- a/.github/workflows/docker_build_push.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: DockerBuildAndPush - -on: - push: - branches: - - master - - developement - -env: - IMAGE_NAME: transcriberbot - -jobs: - push: - runs-on: ubuntu-latest - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v2 - - - name: Login to ghcr registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin - - - name: Build image - run: docker build . --file Dockerfile --tag $IMAGE_NAME - - - name: Push image - run: | - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION From 004140122ebe31fac7590e55f46ad9ca33ed15f8 Mon Sep 17 00:00:00 2001 From: Carlo Alberto Barbano Date: Sun, 23 Feb 2025 18:31:22 +0100 Subject: [PATCH 2/5] update tag name --- run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 0fe85f7..5372365 100755 --- a/run.sh +++ b/run.sh @@ -1,6 +1,6 @@ #!/bin/sh -docker pull ghcr.io/charslab/transcriberbot:ptb-async +docker pull ghcr.io/charslab/transcriberbot:development docker run \ -e LC_ALL=C \ -d --restart unless-stopped \ @@ -12,4 +12,4 @@ docker run \ --cpus=4.0 \ --memory=3000m \ -u "$(id -u):1337" \ - ghcr.io/charslab/transcriberbot:ptb-async \ No newline at end of file + ghcr.io/charslab/transcriberbot:development \ No newline at end of file From fb45951f0468ec3f2f465ec8c7e1506ad3fe68ed Mon Sep 17 00:00:00 2001 From: Carlo Alberto Barbano Date: Sun, 23 Feb 2025 18:42:20 +0100 Subject: [PATCH 3/5] remove logging from db.__exit__ --- src/database/db.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/database/db.py b/src/database/db.py index a928ab0..33437e2 100644 --- a/src/database/db.py +++ b/src/database/db.py @@ -33,13 +33,6 @@ def assoc(self): def __exit__(self, exc_type, exc_value, exc_traceback): logger.debug("__exit__") self.__close() - - if exc_type: - logger.error("exc_type: {}".format(exc_type)) - logger.error("exc_value: {}".format(exc_value)) - logger.error("exc_traceback: {}".format(exc_traceback)) - logger.error("Caught exception", exc_info=True) - return True def execute(self, query, *args): From 84e1248337b67e603876059f709fc48a8bafdefe Mon Sep 17 00:00:00 2001 From: Carlo Alberto Barbano Date: Sun, 23 Feb 2025 18:44:25 +0100 Subject: [PATCH 4/5] update action name --- .github/workflows/build_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index c0c8a9b..7abb768 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -1,4 +1,4 @@ -name: DockerBuildAndPush +name: Build Image on: push: From d2937f8923b62fee2e22ddb9ac5d401883806bef Mon Sep 17 00:00:00 2001 From: Farzadalizadeh7 Date: Wed, 26 Feb 2025 00:52:06 +0330 Subject: [PATCH 5/5] Update wit.json --- config/wit.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/wit.json b/config/wit.json index 045b1ef..3e5421d 100644 --- a/config/wit.json +++ b/config/wit.json @@ -2,7 +2,7 @@ "ar-EG": "xxxxx", "ca-ES": "xxxxx", "da-DK": "xxxxx", - "de-DE": "xxxxx", + "de-DE": "1313433163109516", "en-GB": "xxxxx", "en-US": "xxxxx", "es-ES": "xxxxx", @@ -22,4 +22,4 @@ "zh-CN": "xxxxx", "zh-HK": "xxxxx", "zh-TW": "xxxxx" -} \ No newline at end of file +}