mirror of
https://git.madhouse-project.org/algernon/iocaine.git
synced 2025-02-15 14:16:56 +01:00
ci: Don't build if there are no code changes
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:
parent
e8c9bc0056
commit
6099ba6f64
2 changed files with 23 additions and 16 deletions
|
@ -9,6 +9,13 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
|
paths:
|
||||||
|
- '.forgejo/workflows/build.yaml'
|
||||||
|
- 'flake.nix'
|
||||||
|
- 'flake.lock'
|
||||||
|
- 'nix/**'
|
||||||
|
- 'Cargo.*'
|
||||||
|
- 'src/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -48,3 +55,19 @@ jobs:
|
||||||
- name: publish
|
- name: publish
|
||||||
run:
|
run:
|
||||||
docker push git.madhouse-project.org/algernon/iocaine:latest
|
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
|
||||||
|
|
|
@ -26,19 +26,3 @@ jobs:
|
||||||
uses: actions/nix/develop@main
|
uses: actions/nix/develop@main
|
||||||
with:
|
with:
|
||||||
run: treefmt --fail-on-change
|
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
|
|
||||||
|
|
Loading…
Reference in a new issue