ci: Apply GNOME templates default rules

Re-use rules from https://gitlab.gnome.org/GNOME/citemplates/ default-rules
template, but without importing them to ensure that changes in the
citemplates project won't affect us directly

So we have some basic control on what should trigger a workflow,
auto-retry and auto-replace on subsequent pushes
This commit is contained in:
Marco Trevisan (Treviño)
2025-10-23 23:10:15 +02:00
parent 332b6898ef
commit 773815f727

View File

@@ -4,6 +4,26 @@ include:
dist-job-name: "dist-job"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
# This is based on GNOME/citemplates default-rules, but we only apply the
# settings that make sense for glib
default:
interruptible: true
# Auto-retry jobs in case of infra failures
retry:
max: 1
when:
- "runner_system_failure"
- "stuck_or_timeout_failure"
- "scheduler_failure"
- "api_failure"
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
stages:
- style-check
- build