name: weekly docker build

on:
  schedule:
    # Monday midnight
    - cron: '0 0 * * 1'
  workflow_dispatch:

permissions:
  packages: write
  contents: write
  id-token: write

jobs:
  weekly-container-build:
    uses: ./.github/workflows/reusable-container-workflow.yaml
    with:
      build_type: dev
      tag: ${{ github.sha}}
      tag_latest: true
      image: ghcr.io/dragonflydb/dragonfly-weekly
      registry: ghcr.io
      registry_username: ${{ github.repository_owner }}
    secrets:
      registry_password: ${{ secrets.GITHUB_TOKEN }}
