name: Action test on Ubuntu

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

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

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