name: Action test on MacOS

on:
  schedule:
    - cron: "0 4 * * *" # Runs at 04:00 UTC everyday
  push:
  workflow_dispatch:

jobs:
  macos-minimal:
    runs-on: macos-latest
    if: github.event_name != 'push'
    steps:
      - uses: actions/checkout@v2.3.4
      - run: date > reports/macos_report_minimal.txt
      - uses: GuillaumeFalourd/git-commit-push@main

  macos-full:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2.3.4
      - run: date > reports/macos_report_full.txt
      - uses: GuillaumeFalourd/git-commit-push@main
        with:
          email: ${{ github.actor }}[bot]@users.noreply.github.com
          name: ${{ github.actor }}
          commit_message: macos full workflow
          target_branch: macos
          files: reports/macos_report_full.txt
          remote_repository: origin
          access_token: ${{ github.token }}
          force: true
          empty: true
          tags: true