name: crosscheck
on:
  schedule:
    - cron:  '45 5/1 * * *'

jobs:
  crosscheck:
    runs-on: ubuntu-latest
    env:
      YARN_ENABLE_SCRIPTS: false
      CI_LOG: 123
      GITHUB_TOKEN: ${{ secrets.GH_PAT_BOT }}
    steps:
    - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
    - name: check
      run: |
        yarn install --immutable | grep -v 'YN0013'
        yarn phishing:crosscheck
    - name: issue
      if: ${{ failure() }}
      uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
      with:
        filename: .github/crosscheck.md
        update_existing: true

  addrcheck:
    runs-on: ubuntu-latest
    env:
      YARN_ENABLE_SCRIPTS: false
      CI_LOG: 123
      GITHUB_TOKEN: ${{ secrets.GH_PAT_BOT }}
    steps:
    - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
    - name: check
      run: |
        yarn install --immutable | grep -v 'YN0013'
        yarn phishing:addrcheck
    - name: issue
      if: ${{ failure() }}
      uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
      with:
        filename: .github/addrcheck.md
        update_existing: true
