mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 10:24:02 +00:00
fix(cd): avoid deploying stale images and add cleanup policy
This commit is contained in:
@@ -19,6 +19,22 @@ resource "google_artifact_registry_repository" "containers" {
|
||||
|
||||
labels = local.common_labels
|
||||
|
||||
cleanup_policies {
|
||||
id = "keep-last-10"
|
||||
action = "KEEP"
|
||||
most_recent_versions {
|
||||
keep_count = 10
|
||||
}
|
||||
}
|
||||
|
||||
cleanup_policies {
|
||||
id = "delete-stale"
|
||||
action = "DELETE"
|
||||
condition {
|
||||
older_than = "1209600s" # 14 days
|
||||
}
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [
|
||||
labels,
|
||||
|
||||
Reference in New Issue
Block a user