diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3672c25e..a28494e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: push: branches: [master] schedule: - - cron: "0 */6 * * *" + - cron: "0 */2 * * *" concurrency: # Use github.run_id on main branch # Use github.event.pull_request.number on pull requests, so it's unique per pull request @@ -21,20 +21,20 @@ jobs: runs-on: [ ubuntu-latest ] steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Check if PR exists id: check env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + tree -a + git fetch origin prs=$(gh pr list \ --repo "$GITHUB_REPOSITORY" \ --head 'nixos-unstable' \ --base 'master' \ --json title \ --jq 'length') - count_commit=$(git rev-list --left-right --count nixos-unstable...master | awk '{print $1}') + count_commit=$(git rev-list --left-right --count origin/nixos-unstable...origin/master | awk '{print $1}') if (( prs > 0 )) || (( count_commit < 1 )); then echo "skip=true" >> "$GITHUB_OUTPUT" fi