Files
discord-reminder-bot/.github/workflows/docker-publish.yml
renovate[bot] 3f489edb37 Update docker/setup-buildx-action digest to af1b253 (#156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 16:50:56 +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@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- uses: astral-sh/setup-uv@ad5ded2d63f566e08a19ef248c3a694efce8c0e4
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@af1b253b8dc984466d22633f04ef341c1520ed2f
- 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