summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar tobi <tobi.smethurst@protonmail.com>2025-05-02 20:35:49 +0000
committerLibravatar tobi <tobi.smethurst@protonmail.com>2025-05-05 12:07:14 +0200
commit842f575785ad4c3f6a2433f6b9f5fdf5f9ce5f35 (patch)
tree7f17de85b6035da9881a3ff72a327498672a7dfa
parent[chore/cicd] conditional tests + linting for pull requests (#4114) (diff)
downloadgotosocial-842f575785ad4c3f6a2433f6b9f5fdf5f9ce5f35.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