Skip to content

[Enhancement] Github Workflows: Improve/refactor template for claude workflow. #8

@emcd

Description

@emcd

/claude We need to make some modifications to template/.github/workflows/claude.yaml.jinja. Please factor out most of the template into a cross-repo workflow, .github/workflows/xrepo--claude.yaml (with name "Reusable Claude Agent") since we want to be able to use this same workflow logic from multiple repositories but maintain it in only one place. Please look at the other .github/workflows/xrepo--*.yaml workflows for reference and pay particular attention to how they call setup actions, such as python-hatch. The new cross-repo workflow will need to do something similar. You should also look at the various repo-specific workflow templates in template/.github/workflows/*.yaml.jinja to see how they handle workflow versioning and calling the cross-repo workflows.

Please also incorporate a fix that we made to string handling for allowed_tools in .github/workflows/claude.yaml, which was/is our prototype for the workflow template. The template's current handling of allowed tools may be broken, since the arguments must be space-separated.

And, please consider whether the Jinja {% raw %} directives are necessary around the trigger conditions for the claude job. (They may be, but it is not obvious to me that they are. Please include a justification in your final report or PR, if they are, or else remove them.) They are obviously necessary around any ${{ }} to suppress Jinja processing and preserve the structure for Github Actions, but I am less certain about other cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions