Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix multiple things and run only when necessary #962

Merged
merged 8 commits into from
Feb 14, 2025
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/release-docs.yml"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]
types: [closed]
paths:
- "docs/**"
- ".github/workflows/release-docs.yml"
- ".github/workflows/docs.yml"

permissions:
contents: write
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
pull_request:
paths:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '.github/workflows/nix-build.yml'
- 'nix/**'
push:
branches:
- main
paths:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '.github/workflows/nix-build.yml'
- 'nix/**'

jobs:
lints:
Expand All @@ -22,6 +24,6 @@
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

Check warning on line 27 in .github/workflows/nix-build.yml

View workflow job for this annotation

GitHub Actions / Build

Magic Nix Cache is deprecated

Magic Nix Cache has been deprecated due to a change in the underlying GitHub APIs and will stop working on 1 February 2025. To continue caching Nix builds in GitHub Actions, use FlakeHub Cache instead. Replace... - uses: DeterminateSystems/magic-nix-cache-action@main ...with... - uses: DeterminateSystems/flakehub-cache-action@main For more details: https://dtr.mn/magic-nix-cache-eol
- uses: DeterminateSystems/flake-checker-action@main
- run: nix build --max-jobs auto --build-max-jobs auto --print-build-logs
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
branches: [ main ]
tags:
- 'v*.*.*'
paths:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '.github/workflows/release.yml'
- '.goreleaser.yaml'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
name: Test

on: [push, pull_request]
on:
push:
paths:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '.github/workflows/test.yml'
pull_request:
paths:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '.github/workflows/test.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
Loading