name: release
on:
  schedule:
    - cron: '0 * * * *'
  workflow_dispatch:

jobs:
  build_masterci:
    name: build master-ci
    runs-on: ubuntu-20.04
    timeout-minutes: 60
    if: github.repository == 'commaai/openpilot'
    steps:
    - name: Wait for green check mark
      uses: lewagon/wait-on-check-action@e2558238c09778af25867eb5de5a3ce4bbae3dcd
      with:
        ref: master
        wait-interval: 30
        running-workflow-name: 'build master-ci'
        check-regexp: ^((?!.*(build prebuilt).*).)*$
    - uses: actions/checkout@v3
      with:
        submodules: true
        fetch-depth: 0
    - name: Pull LFS
      run: git lfs pull
    - name: Build master-ci
      run: |
        BRANCH=master-ci release/build_devel.sh
