build: optimise pipeline runs (#7)

Reviewed-on: https://git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic/pulls/7
Co-authored-by: Gabor Pihaj <gabor.pihaj@gmail.com>
Co-committed-by: Gabor Pihaj <gabor.pihaj@gmail.com>
This commit is contained in:
Gabor Pihaj 2023-09-30 17:33:08 +00:00 committed by Gabor Pihaj
parent 64a5943b23
commit a68dcbc4db
No known key found for this signature in database
GPG key ID: 7BCF5D144C6C06E3
2 changed files with 10 additions and 4 deletions

View file

@ -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

View file

@ -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