From 46a36b100177f4693f22490eb11cf3590bde4ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Fri, 16 May 2025 19:10:11 +0200 Subject: [PATCH] ci: only run check-renovaterc when the renovaterc changes Otherwise we are just wasting CI time --- .forgejo/workflows/check.yml | 14 +++----------- .forgejo/workflows/renovate.yml | 14 ++++++++++++++ .renovaterc.json => renovate.json | 0 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 .forgejo/workflows/renovate.yml rename .renovaterc.json => renovate.json (100%) diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml index 767a732..142bfe0 100644 --- a/.forgejo/workflows/check.yml +++ b/.forgejo/workflows/check.yml @@ -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 diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml new file mode 100644 index 0000000..ab1aac5 --- /dev/null +++ b/.forgejo/workflows/renovate.yml @@ -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 diff --git a/.renovaterc.json b/renovate.json similarity index 100% rename from .renovaterc.json rename to renovate.json