diff --git a/cookiecutter/check_cookiecutter.sh b/cookiecutter/check_cookiecutter.sh index a3f1ef7c..1e470cff 100755 --- a/cookiecutter/check_cookiecutter.sh +++ b/cookiecutter/check_cookiecutter.sh @@ -19,7 +19,9 @@ function stamp() { owner="bemanproject" \ description="A Beman Library Exemplar" \ godbolt_link="https://godbolt.org/z/4qEPK87va" \ - library_type="$library_type" + library_type="$library_type" \ + _ci_tests_cron="30 15 * * 6" \ + _pre_commit_update_cron="0 16 * * 0" } function check_consistency() { @@ -57,7 +59,9 @@ function check_templating() { paper="P0898R3" \ owner="bemanproject" \ description="A Beman Library RLZrmX9NfS" \ - godbolt_link="https://godbolt.org/z/4qEPK87va" + godbolt_link="https://godbolt.org/z/4qEPK87va" \ + _ci_tests_cron="30 15 * * 6" \ + _pre_commit_update_cron="0 16 * * 0" rm -rf "$out_dir_path/RLZrmX9NfS/infra" local grep_path grep_path=$(mktemp) diff --git a/cookiecutter/cookiecutter.json b/cookiecutter/cookiecutter.json index 0793d6a6..5066b279 100644 --- a/cookiecutter/cookiecutter.json +++ b/cookiecutter/cookiecutter.json @@ -6,6 +6,8 @@ "description": "Short project description.", "godbolt_link": "https://www.example.com", "library_type": ["interface", "static"], + "_ci_tests_cron": "", + "_pre_commit_update_cron": "", "_copy_without_render": [ "infra" ], diff --git a/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/ci_tests.yml b/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/ci_tests.yml index 76ae8d73..a06d852b 100644 --- a/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/ci_tests.yml +++ b/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/ci_tests.yml @@ -9,7 +9,7 @@ on: pull_request: workflow_dispatch: schedule: - - cron: '30 15 * * 6' + - cron: '{% if cookiecutter._ci_tests_cron %}{{ cookiecutter._ci_tests_cron }}{% else %}{{ range(0, 60) | random }} {{ range(13, 18) | random }} * * {{ range(0, 7) | random }}{% endif %}' jobs: beman-submodule-check: diff --git a/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/pre-commit-update.yml b/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/pre-commit-update.yml index f6adefa2..6fc962d5 100644 --- a/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/pre-commit-update.yml +++ b/cookiecutter/{{cookiecutter.project_name}}/.github/workflows/pre-commit-update.yml @@ -5,7 +5,7 @@ name: Weekly pre-commit autoupdate on: workflow_dispatch: schedule: - - cron: "0 16 * * 0" + - cron: "{% if cookiecutter._pre_commit_update_cron %}{{ cookiecutter._pre_commit_update_cron }}{% else %}{{ range(0, 60) | random }} {{ range(13, 18) | random }} * * {{ range(0, 7) | random }}{% endif %}" {% raw -%} jobs: