From ca20eaf45c92ff7d875e2b80c1144e131f182f32 Mon Sep 17 00:00:00 2001 From: nex Date: Mon, 3 Jun 2024 15:34:01 +0100 Subject: [PATCH 1/4] Push to GHCR too --- .gitea/workflows/docker-publish.yaml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/docker-publish.yaml b/.gitea/workflows/docker-publish.yaml index ed926e4..16fcbb8 100644 --- a/.gitea/workflows/docker-publish.yaml +++ b/.gitea/workflows/docker-publish.yaml @@ -1,19 +1,29 @@ -name: Build and Publish Jimmy.2 -run-name: Build and Publish Jimmy.2 +name: Build and Publish college-bot-v2 +run-name: Build and Publish college-bot-v2 on: [push] jobs: build_and_publish: - runs-on: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04] + runs-on: [ubuntu-latest] steps: - name: Check out repository code uses: actions/checkout@v4 - name: Build Docker image run: | - docker build -t git.i-am.nexus/nex/college-bot:latest . - - name: Log into container registry - run: | - docker login -u ${{ secrets.CR_USERNAME }} -p ${{ secrets.CR_PASSWORD }} git.i-am.nexus + docker build -t git.i-am.nexus/nex/college-bot:latest -t ghcr.io/nexy7574/college-bot:latest . + - name: Log into GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: nexy7574 + password: ${{ secrets.GHCR_PASSWORD }} + - name: Log into forgejo CR + uses: docker/login-action@v3 + with: + registry: git.i-am.nexus + username: nex + password: ${{ secrets.CR_PASSWORD }} - name: Push to container registry run: | - docker push git.i-am.nexus/nex/college-bot:latest \ No newline at end of file + docker push git.i-am.nexus/nex/college-bot:latest + docker push ghcr.io/nexy7574/college-bot:latest \ No newline at end of file From 486a4425cb98e376f7dbbe6221ca3747d530ced3 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Mon, 3 Jun 2024 15:42:27 +0100 Subject: [PATCH 2/4] Push to GHCR separately, label container --- .gitea/workflows/docker-publish.yaml | 18 ++++++++++-------- Dockerfile | 5 +++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/docker-publish.yaml b/.gitea/workflows/docker-publish.yaml index 16fcbb8..bf87d88 100644 --- a/.gitea/workflows/docker-publish.yaml +++ b/.gitea/workflows/docker-publish.yaml @@ -10,20 +10,22 @@ jobs: uses: actions/checkout@v4 - name: Build Docker image run: | - docker build -t git.i-am.nexus/nex/college-bot:latest -t ghcr.io/nexy7574/college-bot:latest . - - name: Log into GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: nexy7574 - password: ${{ secrets.GHCR_PASSWORD }} + docker build -t git.i-am.nexus/nex/college-bot:latest -t ghcr.io/nexy7574/college-bot:latest . - name: Log into forgejo CR uses: docker/login-action@v3 with: registry: git.i-am.nexus username: nex password: ${{ secrets.CR_PASSWORD }} - - name: Push to container registry + - name: Push to forgejo CR run: | docker push git.i-am.nexus/nex/college-bot:latest + - name: Log into GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: nexy7574 + password: ${{ secrets.GHCR_PASSWORD }} + - name: Push to GHCR + run: | docker push ghcr.io/nexy7574/college-bot:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index c10b285..e3904e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,10 @@ FROM python:3.11-bookworm +LABEL org.opencontainers.image.source https://git.i-am.nexus/nex/college-bot-v2 +LABEL org.opencontainers.image.licenses AGPL-3.0 +LABEL org.opencontainers.image.title "College Bot v2" +LABEL org.opencontainers.image.description "Version 2 of jimmy." + WORKDIR /app RUN DEBIAN_FRONTEND=noninteractive apt-get update From e377f41f6f88dd46db2df807c43fdc8908c66dfa Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Mon, 3 Jun 2024 15:44:59 +0100 Subject: [PATCH 3/4] Add URL and SOURCE to image labels --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index e3904e0..668cb3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM python:3.11-bookworm LABEL org.opencontainers.image.source https://git.i-am.nexus/nex/college-bot-v2 +LABEL org.opencontainers.image.url https://git.i-am.nexus/nex/college-bot-v2 LABEL org.opencontainers.image.licenses AGPL-3.0 LABEL org.opencontainers.image.title "College Bot v2" LABEL org.opencontainers.image.description "Version 2 of jimmy." From 0737fdd81b07760b2267471d956660c3bdb13136 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Mon, 3 Jun 2024 15:50:10 +0100 Subject: [PATCH 4/4] Bump max auto transcode size to 30 minutes --- src/cogs/auto_responder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cogs/auto_responder.py b/src/cogs/auto_responder.py index 4451161..44dd2b4 100644 --- a/src/cogs/auto_responder.py +++ b/src/cogs/auto_responder.py @@ -128,11 +128,11 @@ class AutoResponder(commands.Cog): info = await cog._run_ffprobe(uri, True) if not info: raise ValueError("No info found for %r" % uri) - if float(info["format"].get("duration", 600.1)) > 600.0: + if float(info["format"].get("duration", 1800.1)) > 1800.0: self.log.warning( - "Video %r is %.2f seconds long (more than 10 minutes). Refusing to process further.", + "Video %r is %.2f seconds long (more than 30 minutes). Refusing to process further.", uri, - float(info["format"].get("duration", 600.1)), + float(info["format"].get("duration", 1800.1)), ) return update_reaction("\N{TIMER CLOCK}\U0000fe0f") streams = info.get("streams", [])