Files
discord-reminder-bot/.github/workflows/docker-publish.yml
renovate[bot] 6edc70d6e1 Update astral-sh/setup-uv digest to d4219d1 (#129)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joakim Hellsén <tlovinator@gmail.com>
2025-07-07 04:00:16 +00:00

64 lines
1.8 KiB
YAML

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@09d2acae674a48949e3602304ab46fd20ae0c42f
- uses: astral-sh/setup-uv@d4219d1620c011976ed77813dca7d21d6f676d73
with:
python-version: 3.13
- run: uv sync --all-extras --dev
- run: uv run pytest
- uses: docker/setup-qemu-action@05340d1c670183e7caabdb33ae9f1c80fae3b0c2
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