name: CreateDocs
on:
  workflow_dispatch:
    inputs:
      branches:
        description: "JSON array of branches: ['18','20'] (no spaces) or leave blank for all current branches."
        required:    false
        type:        string
  schedule:
#           Times are UTC
    - cron: '0 04 * * *'

jobs:
  CreateDocs:
    if: ${{ ( github.event_name == 'schedule' && fromJSON(vars.WIKIDOCS_ENABLE) ) || github.event_name == 'workflow_dispatch' }}
    strategy:
      fail-fast: false
      matrix:
        branch: ${{ fromJSON(inputs.branches || vars.WIKIDOC_BRANCHES) }}
    uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskCreateDocs.yml@main
    with:
      asterisk_repo:     ${{ github.repository }}
      base_branch:       ${{ matrix.branch }}

