diff --git a/.github/workflows/update_flake_lock.py b/.github/workflows/update_flake_lock.py index 959beda..73d8842 100755 --- a/.github/workflows/update_flake_lock.py +++ b/.github/workflows/update_flake_lock.py @@ -38,6 +38,10 @@ class FlakeLock: def inputs(self): return self._lock["nodes"]["root"]["inputs"] + def is_github(self, flake_input): + n = self._lock["nodes"][flake_input] + return n.type == "github"; + def get_input(self, flake_input): n = self._lock["nodes"][flake_input] repo_id = f"{n['locked']['owner']}/{n['locked']['repo']}" @@ -131,6 +135,10 @@ def main(): for l in diff: print(l, end="") + if not lock.is_github(flake_input): + print(f"[{flake_input}] Non-github repositories unsupported") + continue + old = lock.get_input(flake_input) new = FlakeLock(github, updated_lock_contents).get_input(flake_input)