From b0959894edddeb6d27d07159638d18c14b5eaafa Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 30 Nov 2025 07:33:56 +0100 Subject: [PATCH] build: do not update IANA assignments if there is no visible change --- .github/workflows/update-nix-flake-lock.yml | 18 ++++++++++++++++++ flake.nix | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-nix-flake-lock.yml b/.github/workflows/update-nix-flake-lock.yml index 98cb42d1..e0483c79 100644 --- a/.github/workflows/update-nix-flake-lock.yml +++ b/.github/workflows/update-nix-flake-lock.yml @@ -21,8 +21,26 @@ jobs: with: persist-credentials: false - uses: cachix/install-nix-action@v31 + - name: Check current IANA assignments + if: matrix.source == 'iana-assignments' + run: | + nix build .\#ianaServiceNames + make orchestrator/clickhouse/data/tcp.csv orchestrator/clickhouse/data/udp.csv SERVICES_URL=result + mkdir before~ + mv orchestrator/clickhouse/data/tcp.csv orchestrator/clickhouse/data/udp.csv before~ - name: Update Nix lockfile run: nix flake update ${{ matrix.source }} + - name: Check new IANA assignments + if: matrix.source == 'iana-assignments' + run: | + nix build .\#ianaServiceNames + make orchestrator/clickhouse/data/tcp.csv orchestrator/clickhouse/data/udp.csv SERVICES_URL=result + mkdir after~ + mv orchestrator/clickhouse/data/tcp.csv orchestrator/clickhouse/data/udp.csv after~ + ! diff -u before~ after~ || { + echo No diff... + git reset --hard + } - name: Create pull request uses: peter-evans/create-pull-request@v7 with: diff --git a/flake.nix b/flake.nix index 0df7f888..b401fd24 100644 --- a/flake.nix +++ b/flake.nix @@ -126,7 +126,7 @@ }; packages = { - inherit backend frontend; + inherit backend frontend ianaServiceNames; default = backend; } // (l.optionalAttrs (system == "x86_64-linux") (l.attrsets.listToAttrs (l.lists.map