Merge remote-tracking branch 'origin/master'
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 15s
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 15s
This commit is contained in:
commit
37bb148e8e
3 changed files with 29 additions and 11 deletions
|
@ -1,19 +1,31 @@
|
||||||
name: Build and Publish Jimmy.2
|
name: Build and Publish college-bot-v2
|
||||||
run-name: Build and Publish Jimmy.2
|
run-name: Build and Publish college-bot-v2
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_publish:
|
build_and_publish:
|
||||||
runs-on: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04]
|
runs-on: [ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build -t git.i-am.nexus/nex/college-bot:latest .
|
docker build -t git.i-am.nexus/nex/college-bot:latest -t ghcr.io/nexy7574/college-bot:latest .
|
||||||
- name: Log into container registry
|
- name: Log into forgejo CR
|
||||||
run: |
|
uses: docker/login-action@v3
|
||||||
docker login -u ${{ secrets.CR_USERNAME }} -p ${{ secrets.CR_PASSWORD }} git.i-am.nexus
|
with:
|
||||||
- name: Push to container registry
|
registry: git.i-am.nexus
|
||||||
|
username: nex
|
||||||
|
password: ${{ secrets.CR_PASSWORD }}
|
||||||
|
- name: Push to forgejo CR
|
||||||
run: |
|
run: |
|
||||||
docker push git.i-am.nexus/nex/college-bot:latest
|
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
|
|
@ -1,5 +1,11 @@
|
||||||
FROM python:3.11-bookworm
|
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
|
WORKDIR /app
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update
|
||||||
|
|
|
@ -128,11 +128,11 @@ class AutoResponder(commands.Cog):
|
||||||
info = await cog._run_ffprobe(uri, True)
|
info = await cog._run_ffprobe(uri, True)
|
||||||
if not info:
|
if not info:
|
||||||
raise ValueError("No info found for %r" % uri)
|
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(
|
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,
|
uri,
|
||||||
float(info["format"].get("duration", 600.1)),
|
float(info["format"].get("duration", 1800.1)),
|
||||||
)
|
)
|
||||||
return update_reaction("\N{TIMER CLOCK}\U0000fe0f")
|
return update_reaction("\N{TIMER CLOCK}\U0000fe0f")
|
||||||
streams = info.get("streams", [])
|
streams = info.get("streams", [])
|
||||||
|
|
Loading…
Reference in a new issue