Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fmway authored Dec 2, 2024
1 parent cd6b1b6 commit 11eab7b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 11eab7b

Please sign in to comment.