From 16199570c1abfb9b9f4f9cfb03ec62be397384b3 Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Mon, 1 Apr 2024 12:13:54 +0200 Subject: [PATCH] add when to pipeline --- .woodpecker/x86-linux.yaml | 14 ++++++++++++++ packages/woodpecker-pipeline/default.nix | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/.woodpecker/x86-linux.yaml b/.woodpecker/x86-linux.yaml index d871d191..a8569bf2 100644 --- a/.woodpecker/x86-linux.yaml +++ b/.woodpecker/x86-linux.yaml @@ -189,5 +189,19 @@ "image": "bash", "name": "Push the-hub to Attic" } + ], + "when": [ + { + "event": "manual" + }, + { + "branch": "main", + "event": "push" + }, + { + "branch": "main", + "event": "pull_request", + "repo": "MayNiklas/update_flake_lock_action" + } ] } diff --git a/packages/woodpecker-pipeline/default.nix b/packages/woodpecker-pipeline/default.nix index 51544f84..76aab0ed 100644 --- a/packages/woodpecker-pipeline/default.nix +++ b/packages/woodpecker-pipeline/default.nix @@ -36,6 +36,11 @@ let backend = "local"; platform = woodpecker-platforms."${arch}"; }; + when = pkgs.lib.lists.flatten ([ + { event = "manual"; } + { event = "push"; branch = "main"; } + { event = "pull_request"; branch = "main"; repo = "MayNiklas/update_flake_lock_action"; } + ]); steps = pkgs.lib.lists.flatten ([ nixFlakeShow ] ++ [ atticSetupStep ] ++ (map (host: