name: nightly-opensuse

on:
  schedule:
    - cron: "32 23 * * *"
  workflow_dispatch:

env:
  BUILDDIR: /build
  SRCDIR: ${{ github.workspace }}
  CMAKE_ARGS: |
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
    -DCMAKE_BUILD_TYPE=Debug
    -DBUILD_SCHEMA_TESTING=ON
    -DBUILD_TESTING=ON
    -DBUILD_APPSTREAM=ON
    -DBUILD_APPDATA=ON

jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: docker://opensuse/tumbleweed
      options: --tmpfs /build:rw --user 0:0
    steps:
      - name: "prepare git"
        shell: bash
        run: zypper --non-interactive in git-core jq curl
      - name: "prepare source"
        uses: calamares/actions/generic-checkout@v5
      - name: "install dependencies"
        shell: bash
        run: ./ci/deps-opensuse.sh
      - name: "build"
        shell: bash
        run: ./ci/build.sh