Files
discord-reminder-bot/.github/workflows/docker-publish.yml
renovate[bot] c11714fe8c Update docker/setup-buildx-action digest to ae7d689 (#149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-05 17:31:50 +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@184bdaa0721073962dff0199f1fb9940f07167d1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709
- uses: astral-sh/setup-uv@632449003afdd835739aefb9d43e618323dc4b27
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@ae7d6893e8453cb836c63c002c65291c0f4533fd
- 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