mirror of
https://github.com/TheLovinator1/discord-reminder-bot.git
synced 2025-07-13 09:03:29 +02:00
Go back to GitHub workflows
This commit is contained in:
33
.github/copilot-instructions.md
vendored
Normal file
33
.github/copilot-instructions.md
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
This is a Discord.py bot that allows you to set date, cron and interval reminders with APScheduler. Dates are parsed using dateparser.
|
||||
|
||||
Use try-except blocks, type hints, f-strings, logging, and Google style docstrings.
|
||||
|
||||
Add helpful message when using assert in tests.
|
||||
|
||||
Docstrings that doesn't return anything should not have a return section.
|
||||
|
||||
A function docstring should describe the function's behavior, arguments, side effects, exceptions, return values, and any other information that may be relevant to the user.
|
||||
|
||||
Including the exception object in the log message is redundant.
|
||||
|
||||
We use GitHub.
|
||||
|
||||
Channel reminders have the following kwargs: "channel_id", "message", "author_id".
|
||||
|
||||
User DM reminders have the following kwargs: "user_id", "guild_id", "message".
|
||||
|
||||
Bot has the following commands:
|
||||
|
||||
"/remind add message:<str> time:<str> dm_and_current_channel:<bool> user:<user> channel:<channel>"
|
||||
|
||||
"/remind remove id:<job_id>"
|
||||
|
||||
"/remind edit id:<job_id>"
|
||||
|
||||
"/remind pause_unpause id:<job_id>"
|
||||
|
||||
"/remind list"
|
||||
|
||||
"/remind cron message:<str> year:<int> month:<int> day:<int> week:<int> day_of_week:<str> hour:<int> minute:<int> second:<int> start_date:<str> end_date:<str> timezone:<str> jitter:<int> channel:<channel> user:<user> dm_and_current_channel:<bool>"
|
||||
|
||||
"/remind interval message:<str> weeks:<int> days:<int> hours:<int> minutes:<int> seconds:<int> start_date:<str> end_date:<str> timezone:<str> jitter:<int> channel:<channel> user:<user> dm_and_current_channel:<bool>"
|
11
.github/renovate.json
vendored
Normal file
11
.github/renovate.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
],
|
||||
"automerge": true,
|
||||
"configMigration": true,
|
||||
"dependencyDashboard": false,
|
||||
"osvVulnerabilityAlerts": true,
|
||||
"timezone": "Europe/Stockholm"
|
||||
}
|
63
.github/workflows/docker-publish.yml
vendored
Normal file
63
.github/workflows/docker-publish.yml
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 16 * * 0'
|
||||
|
||||
env:
|
||||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
TIMEZONE: Europe/Stockholm
|
||||
LOG_LEVEL: Info
|
||||
SQLITE_LOCATION: /data/jobs.sqlite
|
||||
|
||||
jobs:
|
||||
build-and-push-docker:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: docker/login-action@3d100841f68d4548bf57e52eb27bd33ec5069f55
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- uses: docker/login-action@3d100841f68d4548bf57e52eb27bd33ec5069f55
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
|
||||
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86
|
||||
with:
|
||||
python-version: 3.13
|
||||
|
||||
- run: uv sync --all-extras --dev
|
||||
- run: uv run pytest
|
||||
|
||||
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64, linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: thelovinator/discord-reminder-bot:latest
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64, linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ghcr.io/thelovinator1/discord-reminder-bot:latest
|
Reference in New Issue
Block a user