name: Docker base

on:
  workflow_dispatch:
  push:
    tags: [ 'docker-base-*' ]
    
    # Don't trigger if it's just a documentation update
    paths-ignore:
      - '**.md'
      - '**.MD'
      - '**.yml'
      - 'docs/**'
      - 'LICENSE'
      - '.gitattributes'
      - '.gitignore'
      - '.dockerignore'


jobs:
  build_and_push:
    uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main
    with:
      docker_build_file: ./Dockerfile-base
      platform_linux_arm32v7_enabled: true
      platform_linux_arm64v8_enabled: true
      platform_linux_amd64_enabled: true
      push_enabled: true
      build_nohealthcheck: false
      ghcr_repo_owner: ${{ github.repository_owner }}
      ghcr_repo: ${{ github.repository }}
      build_latest: false
    secrets:
      ghcr_token: ${{ secrets.GITHUB_TOKEN }}
