Skip to content

Commit

Permalink
ci(limit): reduce CI usage on private repo
Browse files Browse the repository at this point in the history
  • Loading branch information
leet4tari committed Aug 20, 2024
1 parent bd48155 commit b54fa5d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Security audit - daily
name: Security audit - monthly

'on':
push:
Expand All @@ -13,15 +13,22 @@ name: Security audit - daily
- '**/audit.toml'
# Rerun periodicly to pick up new advisories
schedule:
- cron: '43 05 * * *'
- cron: '43 05 01 * *'
# Run manually
workflow_dispatch:

concurrency:
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/main' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}

permissions: {}

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/build_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Build Matrix of Binaries
- "build-all-*"
- "build-bins-*"
schedule:
- cron: "05 00 * * *"
- cron: "05 00 01 * *"
workflow_dispatch:

env:
Expand All @@ -31,7 +31,7 @@ env:
concurrency:
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/main' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}

permissions:
contents: read
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name: CI

'on':
workflow_dispatch:
push:
branches:
- "ci-*"
Expand All @@ -12,6 +11,7 @@ name: CI
- reopened
- synchronize
merge_group:
workflow_dispatch:

env:
toolchain: nightly-2024-07-07
Expand All @@ -27,7 +27,9 @@ env:
concurrency:
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/main' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}

permissions: {}

jobs:
clippy:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ name: PR
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}

permissions: {}

jobs:
check-title:
Expand Down

0 comments on commit b54fa5d

Please sign in to comment.