-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
66 lines (64 loc) · 2.43 KB
/
Copy pathaction.yml
File metadata and controls
66 lines (64 loc) · 2.43 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
61
62
63
64
65
66
name: "Commit Familiar"
description: >
Claude draws (and incrementally evolves) a small original SVG character
based on your repository's recent commit activity. Requires only an
ANTHROPIC_API_KEY secret -- no separate image-generation service, no
local setup for contributors.
branding:
icon: "feather"
color: "purple"
inputs:
anthropic-api-key:
description: "Anthropic API key. Pass as a repo secret, never commit it."
required: true
svg-path:
description: "Path (relative to repo root) where the character SVG is written."
required: false
default: "familiar.svg"
state-path:
description: "Path where the last-processed commit SHA is tracked."
required: false
default: ".familiar-state.json"
model:
description: "Anthropic model to use for the one-time initial design."
required: false
default: "claude-sonnet-5"
readme-path:
description: >
README to auto-embed the character into, between
<!-- COMMIT-FAMILIAR:START --> / <!-- COMMIT-FAMILIAR:END --> marker
comments. If the markers aren't found, embedding is skipped (add
them once, anywhere you want the character to sit) -- the file
itself is otherwise left untouched.
required: false
default: "README.md"
min-commits:
description: >
Minimum commits since the last update before doing anything.
Controls "is this activity worth an update", not run *frequency* --
frequency is entirely up to your own cron schedule. Commits below
this threshold are not discarded; they carry over and count toward
the next run.
required: false
default: "1"
display-width:
description: >
Display width in the README, in CSS pixels (via an <img width="...">
tag). The SVG's own internal pixel grid is always 200x200 regardless
of this setting -- this only controls how large it appears.
required: false
default: "140"
runs:
using: "composite"
steps:
- name: Generate/update character SVG
shell: bash
env:
ANTHROPIC_API_KEY: ${{ inputs.anthropic-api-key }}
FAMILIAR_SVG_PATH: ${{ inputs.svg-path }}
FAMILIAR_STATE_PATH: ${{ inputs.state-path }}
FAMILIAR_MODEL: ${{ inputs.model }}
FAMILIAR_README_PATH: ${{ inputs.readme-path }}
FAMILIAR_MIN_COMMITS: ${{ inputs.min-commits }}
FAMILIAR_DISPLAY_WIDTH: ${{ inputs.display-width }}
run: node "${{ github.action_path }}/scripts/generate.mjs"