summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar tobi <tobi.smethurst@protonmail.com>2025-05-02 20:35:49 +0000
committerLibravatar tobi <kipvandenbos@noreply.codeberg.org>2025-05-02 20:35:49 +0000
commit6c879186350f3a4735d0be5e54d386cd246a6785 (patch)
treeb1a291ec921e9d424d074da8bca3d9e80d20e4e1
parent[chore/cicd] conditional tests + linting for pull requests (#4114) (diff)
downloadgotosocial-6c879186350f3a4735d0be5e54d386cd246a6785.tar.xz
[chore/cicd] Snapshot only if source code files have changed (#4115)
See https://codeberg.org/superseriousbusiness/gotosocial/issues/4113, follow up to https://codeberg.org/superseriousbusiness/gotosocial/pulls/4114 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4115 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
-rw-r--r--.woodpecker/snapshot.yaml7
1 files changed, 7 insertions, 0 deletions
diff --git a/.woodpecker/snapshot.yaml b/.woodpecker/snapshot.yaml
index 964a71081..bfa0efcb5 100644
--- a/.woodpecker/snapshot.yaml
+++ b/.woodpecker/snapshot.yaml
@@ -13,6 +13,13 @@ clone:
steps:
snapshot:
+ # Snapshot only if some interesting
+ # source code files have changed.
+ when:
+ # https://woodpecker-ci.org/docs/usage/workflow-syntax#evaluate
+ # https://woodpecker-ci.org/docs/usage/environment#built-in-environment-variables
+ - evaluate: '(not ("CI_PIPELINE_FILES" in $env)) || any(fromJSON(CI_PIPELINE_FILES), { # startsWith "internal/" || # startsWith "cmd/" || # startsWith "testrig/" || # startsWith "vendor/" || # startsWith "web/" || # == "Dockerfile" })'
+
# https://codeberg.org/superseriousbusiness/gotosocial-woodpecker-build
image: superseriousbusiness/gotosocial-woodpecker-build:0.10.0
pull: true