# Workflow to check for a recent OpenMM release candidate.
#
# If a recent RC is found, trigger a second workflow to test against it.
# See also: test-openmm-rc.yml
name: "Check for OpenMM RC"
on:
  pull_request:
    branches:
      - master
  schedule:
    - cron: "0 9 * * */2"

jobs:
  check-rc:
    runs-on: ubuntu-latest
    name: "Check for OpenMM RC"
    steps:
      - uses: actions/checkout@v2
      - uses: dwhswenson/conda-rc-check@main
        id: checkrc
        with:
          channel: conda-forge
          package: openmm
          ndays: 30  # TODO: decrease to 3
          labels: openmm_rc
      - uses: benc-uk/workflow-dispatch@v1
        with:
          workflow: Test OpenMM Release Candidate
          token: ${{ secrets.DISPATCH_TOKEN }}
        if: ${{ steps.checkrc.outputs.hasrc == 'True' }}

# Workflow to check for a recent OpenMM release candidate.
#
# If a recent RC is found, trigger a second workflow to test against it.
# See also: test-openmm-rc.yml
name: "Check for OpenMM RC"
on:
  schedule:
    - cron: "0 9 * * */2"

jobs:
  check-rc:
    runs-on: ubuntu-latest
    name: "Check for OpenMM RC"
    steps:
      - uses: actions/checkout@v2
      - uses: dwhswenson/conda-rc-check@main
        id: checkrc
        with:
          channel: conda-forge
          package: openmm
          ndays: 30  # TODO: decrease to 3
          labels: openmm_rc
      - uses: benc-uk/workflow-dispatch@v1
        with:
          workflow: Test OpenMM Release Candidate
          token: ${{ secrets.DISPATCH_TOKEN }}
        if: ${{ steps.checkrc.outputs.hasrc == 'True' }}

Revert "testing if we can trigger whole pipeline via PR"
Revert "testing if we can trigger whole pipeline via PR"

This reverts commit 5afe34309aff9ac79fc8467965f7b5da4aad2d2e.
