Merge remote-tracking branch 'origin/master'
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 15s

This commit is contained in:
Nexus 2024-06-04 01:49:10 +01:00
commit 37bb148e8e
Signed by: nex
GPG key ID: 0FA334385D0B689F
3 changed files with 29 additions and 11 deletions

View file

@ -1,19 +1,31 @@
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
- name: Push to container registry
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 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

View file

@ -1,5 +1,11 @@
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."
WORKDIR /app
RUN DEBIAN_FRONTEND=noninteractive apt-get update

View file

@ -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", [])