-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
60 lines (58 loc) · 2.28 KB
/
Copy pathaction.yml
File metadata and controls
60 lines (58 loc) · 2.28 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Powderworks Housekeeping
description: "Check a repo is in good order: branch protection, CI, dependabot, lockfiles, README, license. Snobby yet configurable."
branding:
icon: home
color: gray-dark
inputs:
token:
description: >-
Token for API reads. Defaults to the workflow token, which cannot see
some admin-level settings (vulnerability alerts, secret scanning,
workflow permissions) — those checks skip with a note. Pass a
fine-grained PAT with read-only Administration scope for full coverage.
default: ${{ github.token }}
only:
description: Comma-separated subset of checks to run (default all).
default: ""
captain:
description: >-
Path to a housecaptain.toml fleet manifest. When set, runs the captain
delegation check (is every fleet member auditing itself?) instead of
auditing this repo.
default: ""
dispatch:
description: >-
With captain: also trigger every member's self-audit now, so new checks
reach the fleet immediately instead of waiting for weekly crons.
Requires a token with actions:write on the members.
default: ""
sync-configs:
description: >-
With captain: push fleet-owned managed configs (stylelint, vale, …) to
members as isolated PRs when they drift from the canonical copies under
.fleet/. Requires a token with contents:write + pull_requests:write on
the members. Pair with an on.push path filter for .fleet/** so a config
change fans out on merge.
default: ""
runs:
using: composite
steps:
- uses: astral-sh/setup-uv@v7
- shell: bash
env:
GH_TOKEN: ${{ inputs.token }}
ONLY: ${{ inputs.only }}
CAPTAIN: ${{ inputs.captain }}
DISPATCH: ${{ inputs.dispatch }}
SYNC_CONFIGS: ${{ inputs.sync-configs }}
run: |
if [ -n "$CAPTAIN" ]; then
args=()
[ "$DISPATCH" = "true" ] && args+=(--dispatch)
[ "$SYNC_CONFIGS" = "true" ] && args+=(--sync-configs --yes)
uvx --from "${{ github.action_path }}" housekeeper captain "$CAPTAIN" "${args[@]}"
elif [ -n "$ONLY" ]; then
uvx --from "${{ github.action_path }}" housekeeper check --only "$ONLY"
else
uvx --from "${{ github.action_path }}" housekeeper check
fi