diff --git a/.github/workflows/.container.template.j2 b/.github/workflows/.container.template.j2 index f8c24f4..6128998 100644 --- a/.github/workflows/.container.template.j2 +++ b/.github/workflows/.container.template.j2 @@ -3,7 +3,7 @@ name: "<{ name }> 🐳 <% if is_mirror -%> Mirror <%- else %>Container<% endif % on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 <{ cron_hour }> * * *" push: branches: - '*' diff --git a/.github/workflows/almalinux-containers.yml b/.github/workflows/almalinux-containers.yml index e55d1db..4d43c6e 100644 --- a/.github/workflows/almalinux-containers.yml +++ b/.github/workflows/almalinux-containers.yml @@ -3,7 +3,7 @@ name: "AlmaLinux 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 17 * * *" push: branches: - '*' diff --git a/.github/workflows/amazonlinux-containers.yml b/.github/workflows/amazonlinux-containers.yml index e38fd19..81a339d 100644 --- a/.github/workflows/amazonlinux-containers.yml +++ b/.github/workflows/amazonlinux-containers.yml @@ -3,7 +3,7 @@ name: "Amazon Linux 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 16 * * *" push: branches: - '*' diff --git a/.github/workflows/archlinux-containers.yml b/.github/workflows/archlinux-containers.yml index a07d647..f316d33 100644 --- a/.github/workflows/archlinux-containers.yml +++ b/.github/workflows/archlinux-containers.yml @@ -3,7 +3,7 @@ name: "ArchLinux 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 14 * * *" push: branches: - '*' diff --git a/.github/workflows/busybox-containers.yml b/.github/workflows/busybox-containers.yml index 85d9d95..662ef4f 100644 --- a/.github/workflows/busybox-containers.yml +++ b/.github/workflows/busybox-containers.yml @@ -3,7 +3,7 @@ name: "BusyBox 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 13 * * *" push: branches: - '*' diff --git a/.github/workflows/centos-containers.yml b/.github/workflows/centos-containers.yml index 7d81957..ff5bae1 100644 --- a/.github/workflows/centos-containers.yml +++ b/.github/workflows/centos-containers.yml @@ -3,7 +3,7 @@ name: "CentOS 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 12 * * *" push: branches: - '*' diff --git a/.github/workflows/centos-stream-containers.yml b/.github/workflows/centos-stream-containers.yml index 8ef62e3..6c7868e 100644 --- a/.github/workflows/centos-stream-containers.yml +++ b/.github/workflows/centos-stream-containers.yml @@ -3,7 +3,7 @@ name: "CentOS Stream 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 11 * * *" push: branches: - '*' diff --git a/.github/workflows/consul-containers.yml b/.github/workflows/consul-containers.yml index e2403e6..57ead67 100644 --- a/.github/workflows/consul-containers.yml +++ b/.github/workflows/consul-containers.yml @@ -3,7 +3,7 @@ name: "Consul 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 10 * * *" push: branches: - '*' diff --git a/.github/workflows/debian-containers.yml b/.github/workflows/debian-containers.yml index 8e764b0..84e70d9 100644 --- a/.github/workflows/debian-containers.yml +++ b/.github/workflows/debian-containers.yml @@ -3,7 +3,7 @@ name: "Debian 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 9 * * *" push: branches: - '*' diff --git a/.github/workflows/etcd-v2-containers.yml b/.github/workflows/etcd-v2-containers.yml index f3a6731..40cbdf3 100644 --- a/.github/workflows/etcd-v2-containers.yml +++ b/.github/workflows/etcd-v2-containers.yml @@ -3,7 +3,7 @@ name: "Etcd v2 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 8 * * *" push: branches: - '*' diff --git a/.github/workflows/etcd-v3-containers.yml b/.github/workflows/etcd-v3-containers.yml index 9d552cd..c04a609 100644 --- a/.github/workflows/etcd-v3-containers.yml +++ b/.github/workflows/etcd-v3-containers.yml @@ -3,7 +3,7 @@ name: "Etcd v3 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 7 * * *" push: branches: - '*' diff --git a/.github/workflows/fedora-containers.yml b/.github/workflows/fedora-containers.yml index 889edfe..5c66f39 100644 --- a/.github/workflows/fedora-containers.yml +++ b/.github/workflows/fedora-containers.yml @@ -3,7 +3,7 @@ name: "Fedora 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 6 * * *" push: branches: - '*' diff --git a/.github/workflows/mariadb-containers.yml b/.github/workflows/mariadb-containers.yml index b7fa435..e53790b 100644 --- a/.github/workflows/mariadb-containers.yml +++ b/.github/workflows/mariadb-containers.yml @@ -3,7 +3,7 @@ name: "MariaDB 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 5 * * *" push: branches: - '*' diff --git a/.github/workflows/mysql-server-containers.yml b/.github/workflows/mysql-server-containers.yml index dfa6f0c..ef53a7e 100644 --- a/.github/workflows/mysql-server-containers.yml +++ b/.github/workflows/mysql-server-containers.yml @@ -3,7 +3,7 @@ name: "MySQL Server 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 4 * * *" push: branches: - '*' diff --git a/.github/workflows/openldap-minion-containers.yml b/.github/workflows/openldap-minion-containers.yml index d1eb553..d80fd39 100644 --- a/.github/workflows/openldap-minion-containers.yml +++ b/.github/workflows/openldap-minion-containers.yml @@ -3,7 +3,7 @@ name: "OpenLDAP Minion 🐳 Container" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 22 * * *" push: branches: - '*' diff --git a/.github/workflows/opensuse-containers.yml b/.github/workflows/opensuse-containers.yml index 838df24..110e1e4 100644 --- a/.github/workflows/opensuse-containers.yml +++ b/.github/workflows/opensuse-containers.yml @@ -3,7 +3,7 @@ name: "Opensuse 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 3 * * *" push: branches: - '*' diff --git a/.github/workflows/packaging-containers.yml b/.github/workflows/packaging-containers.yml index 98fbb9f..ccdda64 100644 --- a/.github/workflows/packaging-containers.yml +++ b/.github/workflows/packaging-containers.yml @@ -3,7 +3,7 @@ name: "Salt Packaging 🐳 Container" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 19 * * *" push: branches: - '*' diff --git a/.github/workflows/percona-containers.yml b/.github/workflows/percona-containers.yml index 48a6976..a6bbab9 100644 --- a/.github/workflows/percona-containers.yml +++ b/.github/workflows/percona-containers.yml @@ -3,7 +3,7 @@ name: "Percona 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 2 * * *" push: branches: - '*' diff --git a/.github/workflows/photon-containers.yml b/.github/workflows/photon-containers.yml index 5d65ede..76cf6b0 100644 --- a/.github/workflows/photon-containers.yml +++ b/.github/workflows/photon-containers.yml @@ -3,7 +3,7 @@ name: "Photon 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 1 * * *" push: branches: - '*' diff --git a/.github/workflows/rabbitmq-containers.yml b/.github/workflows/rabbitmq-containers.yml index d66c8ea..0861b94 100644 --- a/.github/workflows/rabbitmq-containers.yml +++ b/.github/workflows/rabbitmq-containers.yml @@ -3,7 +3,7 @@ name: "RabbitMQ 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 23 * * *" push: branches: - '*' diff --git a/.github/workflows/redis-containers.yml b/.github/workflows/redis-containers.yml index beb6db4..73edd62 100644 --- a/.github/workflows/redis-containers.yml +++ b/.github/workflows/redis-containers.yml @@ -3,7 +3,7 @@ name: "Redis 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 22 * * *" push: branches: - '*' diff --git a/.github/workflows/salt-containers.yml b/.github/workflows/salt-containers.yml index 35decca..b25f5d1 100644 --- a/.github/workflows/salt-containers.yml +++ b/.github/workflows/salt-containers.yml @@ -3,7 +3,7 @@ name: "Salt Releases 🐳 Container" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 23 * * *" push: branches: - '*' diff --git a/.github/workflows/salt-gitfs-http-containers.yml b/.github/workflows/salt-gitfs-http-containers.yml index 9335e34..e0bbccc 100644 --- a/.github/workflows/salt-gitfs-http-containers.yml +++ b/.github/workflows/salt-gitfs-http-containers.yml @@ -3,7 +3,7 @@ name: "Salt GitFS HTTP Server 🐳 Container" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 20 * * *" push: branches: - '*' diff --git a/.github/workflows/ssh-minion-containers.yml b/.github/workflows/ssh-minion-containers.yml index cb9e799..97c8fe8 100644 --- a/.github/workflows/ssh-minion-containers.yml +++ b/.github/workflows/ssh-minion-containers.yml @@ -3,7 +3,7 @@ name: "SSH Minion 🐳 Container" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 21 * * *" push: branches: - '*' diff --git a/.github/workflows/tinyproxy-containers.yml b/.github/workflows/tinyproxy-containers.yml index 14a7260..5ed02be 100644 --- a/.github/workflows/tinyproxy-containers.yml +++ b/.github/workflows/tinyproxy-containers.yml @@ -3,7 +3,7 @@ name: "Tinyproxy 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 21 * * *" push: branches: - '*' diff --git a/.github/workflows/ubuntu-containers.yml b/.github/workflows/ubuntu-containers.yml index d3d4b1b..1b22d7a 100644 --- a/.github/workflows/ubuntu-containers.yml +++ b/.github/workflows/ubuntu-containers.yml @@ -3,7 +3,7 @@ name: "Ubuntu 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 20 * * *" push: branches: - '*' diff --git a/.github/workflows/vault-containers.yml b/.github/workflows/vault-containers.yml index ddf59ed..a87c4a6 100644 --- a/.github/workflows/vault-containers.yml +++ b/.github/workflows/vault-containers.yml @@ -3,7 +3,7 @@ name: "Vault 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 19 * * *" push: branches: - '*' diff --git a/.github/workflows/virt-minion-containers.yml b/.github/workflows/virt-minion-containers.yml index 36d4c9e..a070455 100644 --- a/.github/workflows/virt-minion-containers.yml +++ b/.github/workflows/virt-minion-containers.yml @@ -3,7 +3,7 @@ name: "Virt Minion 🐳 Container" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 18 * * *" push: branches: - '*' diff --git a/.github/workflows/zookeeper-containers.yml b/.github/workflows/zookeeper-containers.yml index e0636e2..7689737 100644 --- a/.github/workflows/zookeeper-containers.yml +++ b/.github/workflows/zookeeper-containers.yml @@ -3,7 +3,7 @@ name: "Apache ZooKeeper 🐳 Mirror" on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 15 * * *" push: branches: - '*' diff --git a/tasks/containers.py b/tasks/containers.py index 2d1b4a1..457e31b 100644 --- a/tasks/containers.py +++ b/tasks/containers.py @@ -42,6 +42,7 @@ def generate(ctx, ghcr_org="saltstack/salt-ci-containers"): custom_headers_included = False mirrors_header_included = False + cron_hour_range = list(range(0, 24)) for name, details in containers: is_mirror = details["is_mirror"] @@ -140,6 +141,9 @@ def generate(ctx, ghcr_org="saltstack/salt-ci-containers"): "linux/mips64le", ] exclude_platforms.extend(details.get("exclude_platforms") or []) + cron_hour = cron_hour_range.pop() + if not cron_hour_range: + cron_hour_range = list(range(0, 24)) jinja_context = { "name": name, "slug": details["name"], @@ -148,6 +152,7 @@ def generate(ctx, ghcr_org="saltstack/salt-ci-containers"): "workflow_file_name": workflow_file_name, "multiarch": details.get("multiarch", True), "exclude_platforms": ",".join(exclude_platforms), + "cron_hour": cron_hour, } workflows_dir = utils.REPO_ROOT / ".github" / "workflows" workflow_path = workflows_dir / workflow_file_name