ci: only run check-renovaterc when the renovaterc changes
All checks were successful
/ check-renovaterc (push) Successful in 3s
/ check (push) Successful in 8s
/ build-packages (push) Successful in 14s
/ build-vm (push) Successful in 3s
/ report-size (push) Successful in 3s

Otherwise we are just wasting CI time
This commit is contained in:
Jalil David Salamé Messina 2025-05-16 19:10:11 +02:00
parent dc5e219bc3
commit 46a36b1001
Signed by: jalil
GPG key ID: F016B9E770737A0B
3 changed files with 17 additions and 11 deletions

View file

@ -5,27 +5,19 @@ jobs:
runs-on: nixos
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- run: nix --version
- name: Run checks
run: |
nix --version
nix-fast-build --max-jobs 2 --no-nom --skip-cached --no-link \
--flake ".#checks.$(nix eval --raw --impure --expr builtins.currentSystem)"
check-renovaterc:
runs-on: nixos
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- name: Validate renovaterc.json
run: |
nix --version
nix shell nixpkgs#renovate --command renovate-config-validator
build-packages:
runs-on: nixos
needs: check
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- run: nix --version
- name: Build target
run: |
nix --version
nix-fast-build --max-jobs 1 --no-nom --skip-cached --no-link \
--flake ".#packages.$(nix eval --raw --impure --expr builtins.currentSystem)"
build-vm:
@ -33,9 +25,9 @@ jobs:
needs: build-packages
steps:
- uses: "https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4
- run: nix --version
- name: Build VM configuration
run: |
nix --version
nix build --print-build-logs '.#nixosConfigurations.vm.config.system.build.toplevel'
report-size:
runs-on: nixos

View file

@ -0,0 +1,14 @@
on:
push:
paths:
# only run if the renovate config changed
- renovate.json
jobs:
check-renovaterc:
runs-on: nixos
steps:
- uses: https://git.salame.cl/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: nix --version
- name: Validate renovaterc.json
run: |
nix shell nixpkgs#renovate --command renovate-config-validator