-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdockerRepository.tf
40 lines (37 loc) · 1000 Bytes
/
dockerRepository.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
resource "google_artifact_registry_repository" "ghcr" {
location = local.region
repository_id = "ghcr"
description = "GitHub Container Registry (ghcr)"
format = "DOCKER"
mode = "REMOTE_REPOSITORY"
depends_on = [google_project_service.artifactregistry_api]
remote_repository_config {
description = "GitHub Container Registry (ghcr)"
docker_repository {
custom_repository {
uri = "https://ghcr.io"
}
}
}
dynamic "cleanup_policies" {
for_each = var.force_cloud_run_deployment ? [] : [0]
content {
id = "keep-one-version"
action = "KEEP"
most_recent_versions {
keep_count = 1
}
}
}
dynamic "cleanup_policies" {
for_each = var.force_cloud_run_deployment ? [0] : []
content {
id = "delete-runner"
action = "DELETE"
condition {
package_name_prefixes = ["github-runner-autoscaler"]
older_than = "1s"
}
}
}
}