Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/node-fleet-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: Node maintenance setup check
'on':
push:
branches: [main]
paths:
- .github/workflows/node-*.yml
- defaults/node-maintenance.json
- defaults/node-repositories.json
- node/**
schedule:
- cron: '0 3 * * 1'
workflow_call:
Expand Down
15 changes: 11 additions & 4 deletions docs/node-fleet-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ run to exercise installation, project checks, and publication.

## Change the weekly schedule

This repository also runs its setup check after pushes to `main` that change
`.github/workflows/node-*.yml`, `node/**`, `defaults/node-maintenance.json`, or
`defaults/node-repositories.json`. These triggers observe changes in this host;
the periodic scan still covers changes in the listed repositories. Other hosts
can add a push trigger for their own workflow and inventory paths while keeping
their existing schedule and manual trigger.

This repository checks its inventory every Monday at 03:00 UTC (11:00 in
Singapore). The caller example above uses the same weekly schedule.
To change it, edit the `schedule` block in the host workflow:
Expand All @@ -220,8 +227,8 @@ To change it, edit the `schedule` block in the host workflow:
workflow_dispatch:
```

Remove the `schedule` block to run only manually. Keep `workflow_dispatch` for
on-demand checks. A reusable workflow uses its caller's schedule; it does not
inherit this repository's cron. This schedule is independent of the security
and upgrade cadences in each maintenance installation; do not add the fleet
Remove the `schedule` and `push` blocks, if present, to run only manually. Keep
`workflow_dispatch` for on-demand checks. A reusable workflow uses its caller's
schedule; it does not inherit this repository's cron. This schedule is independent
of the security and upgrade cadences in each maintenance installation; do not add the fleet
cron to those installations' maintenance configuration.
13 changes: 12 additions & 1 deletion node/tests/test_fleet_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,18 @@ def test_workflow_splits_read_access_and_host_issue_write_access():
workflow = yaml.safe_load(
(ROOT / ".github/workflows/node-fleet-check.yml").read_text()
)
assert {"workflow_call", "workflow_dispatch", "schedule"} == set(workflow["on"])
assert {"workflow_call", "workflow_dispatch", "schedule", "push"} == set(
workflow["on"]
)
assert workflow["on"]["push"] == {
"branches": ["main"],
"paths": [
".github/workflows/node-*.yml",
"defaults/node-maintenance.json",
"defaults/node-repositories.json",
"node/**",
],
}
assert workflow["on"]["schedule"] == [{"cron": "0 3 * * 1"}]
assert workflow["name"] == "Node maintenance setup check"
assert workflow["jobs"]["check"]["steps"][0]["with"]["inventory-path"] == (
Expand Down
Loading