Skip to content

Commit

Permalink
Merge pull request #8 from tari-project/ci-disable-scheduled
Browse files Browse the repository at this point in the history
ci(limit): reduce CI usage on private repo by moving some CI to self-hosted and limited schedule runs
  • Loading branch information
leet4tari authored Aug 20, 2024
2 parents bd48155 + c1039fc commit 73e59ac
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
16 changes: 12 additions & 4 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,23 @@ 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:
contents: read

jobs:
security_audit:
runs-on: ubuntu-latest
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/build_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ name: Build Matrix of Binaries
branches:
- "build-all-*"
- "build-bins-*"
# also run once a month
schedule:
- cron: "05 00 * * *"
- cron: "05 00 01 * *"
# Run manually
workflow_dispatch:

env:
Expand All @@ -31,7 +33,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
11 changes: 7 additions & 4 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,12 +27,15 @@ 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

jobs:
clippy:
name: clippy
runs-on: [ubuntu-latest]
runs-on: [ubuntu-20.04]
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -58,7 +61,7 @@ jobs:
machete:
# Checks for unused dependencies.
name: machete
runs-on: [ubuntu-latest]
runs-on: [ubuntu-20.04]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_signed_commits_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions: {}
jobs:
check-signed-commits:
name: Check signed commits in PR
runs-on: ubuntu-latest
runs-on: [ubuntu-latest]
permissions:
contents: read
pull-requests: write
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ 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:
runs-on: ubuntu-latest
runs-on: [ubuntu-20.04]
steps:
- name: install
run: |
Expand Down

0 comments on commit 73e59ac

Please sign in to comment.