Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions