[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>
This commit is contained in:
tobi
2025-05-02 20:35:49 +00:00
committed by tobi
parent bf10ca0203
commit 6c87918635

View File

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