Skip to content

fix: Regenerate index.yaml workflow cannot push to protected main #4

@scotwells

Description

@scotwells

Problem

The Regenerate index.yaml workflow (.github/workflows/generate-index.yaml) runs on push to main (paths plugins/**), regenerates index.yaml from plugins/*.yaml, and then git pushes the result to main. That push is rejected by the repository ruleset:

remote: error: GH013: Repository rule violations found for refs/heads/main.
remote: - Changes must be made through a pull request.
! [remote rejected] main -> main (push declined due to repository rule violations)

This has failed on every run since the repo was created, so index.yaml silently drifts from plugins/ whenever a plugin manifest changes — both the initial v0.8.0-dev.1 import and the v0.8.0-dev.2 bump (#2) required a manual follow-up PR (#3) to regenerate the index.

Desired outcome

Merging a plugins/*.yaml change updates the served index.yaml with no manual step. Options:

  • Have the workflow open a PR with the regenerated index.yaml (e.g. peter-evans/create-pull-request) instead of pushing to main.
  • Or regenerate index.yaml in validate-pr and fail the PR if it's stale, so contributors commit both plugins/*.yaml and index.yaml together.

Workaround (current)

Regenerate index.yaml locally with the workflow's script and land it via PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions