From a68dcbc4dbee23079ebdb3757d64505baf1985ec Mon Sep 17 00:00:00 2001 From: Gabor Pihaj Date: Sat, 30 Sep 2023 17:33:08 +0000 Subject: [PATCH] build: optimise pipeline runs (#7) Reviewed-on: https://git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic/pulls/7 Co-authored-by: Gabor Pihaj Co-committed-by: Gabor Pihaj --- .woodpecker/ci.yaml | 8 +++++++- .woodpecker/release.yaml | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.woodpecker/ci.yaml b/.woodpecker/ci.yaml index 9a8e05b..25e4b2e 100644 --- a/.woodpecker/ci.yaml +++ b/.woodpecker/ci.yaml @@ -5,11 +5,17 @@ variables: binary_cache_token: from_secret: attic_token +when: + - event: pull_request + - event: push + branch: main + steps: build: when: - - event: push - event: pull_request + - event: push + branch: main image: git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic settings: <<: *common_settings diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 3694675..b786c4d 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -1,4 +1,3 @@ - variables: - common_settings: &common_settings binary_cache: https://cache.nix.vdx.hu/private @@ -6,10 +5,11 @@ variables: binary_cache_token: from_secret: attic_token +when: + - event: tag + steps: release: - when: - - event: tag image: git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic settings: <<: *common_settings