ci: Don't build if there are no code changes
Some checks failed
documentation / documentation (push) Waiting to run
documentation / notification (push) Blocked by required conditions
lint / linting (push) Waiting to run
build / build (push) Has been cancelled
build / clippy (push) Has been cancelled

Reconfigured the build & lint workflows, so that the source is only
compiled if there are changes committed to files that might alter the
output.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2025-01-25 11:47:13 +01:00
parent e8c9bc0056
commit 6099ba6f64
No known key found for this signature in database
2 changed files with 23 additions and 16 deletions

View file

@ -9,6 +9,13 @@ on:
push:
branches:
- 'main'
paths:
- '.forgejo/workflows/build.yaml'
- 'flake.nix'
- 'flake.lock'
- 'nix/**'
- 'Cargo.*'
- 'src/**'
jobs:
build:
@ -48,3 +55,19 @@ jobs:
- name: publish
run:
docker push git.madhouse-project.org/algernon/iocaine:latest
clippy:
runs-on: nixos-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup magic attic cache
uses: actions/magic-attic-cache@main
with:
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
- name: clippy
uses: actions/nix/develop@main
with:
run: cargo clippy

View file

@ -26,19 +26,3 @@ jobs:
uses: actions/nix/develop@main
with:
run: treefmt --fail-on-change
clippy:
runs-on: nixos-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup magic attic cache
uses: actions/magic-attic-cache@main
with:
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
- name: clippy
uses: actions/nix/develop@main
with:
run: cargo clippy