Skip to content
This repository was archived by the owner on Nov 3, 2026. It is now read-only.

feat: GitHub Action to auto-update devops-maturity badges and open PRs - #1

Merged
shenxianpeng merged 5 commits into
mainfrom
copilot/create-github-action-for-devops-maturity
Apr 11, 2026
Merged

shenxianpeng merged 5 commits into
mainfrom
copilot/create-github-action-for-devops-maturity

Conversation

Copilot AI commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor

Adds a reusable composite GitHub Action that watches devops-maturity.yml for changes, runs the devops-maturity CLI to recompute the maturity score, updates the README badge in-place, and opens a pull request for team review.

Action (action.yml)

  • Composite action: setup Python → pip install devops-maturity → dm config --file → patch README → peter-evans/create-pull-request@v7
  • Output parsing uses portable awk/sed (no grep -P)
  • Badge update via inline Python: replaces any existing shields.io/badge/DevOps… link or prepends before the first # heading
  • Falls back to constructing badge markdown from the URL when the CLI version doesn't emit the Markdown badge: line
  • github-token is required: true — composite actions don't evaluate ${{ github.token }} expression defaults

Inputs: github-token, file, readme-path, pr-branch, commit-message, pr-title, pr-body
Outputs: score, level, badge-url, badge-markdown, pull-request-number, pull-request-url

Workflows

  • .github/workflows/devops-maturity.yml — example workflow to copy into consumer repos; triggers on push/pull_request path filter for devops-maturity.yml
  • .github/workflows/ci.yml — validates action.yml structure and runs the CLI against the sample file end-to-end; both jobs scoped to permissions: contents: read

Usage

- uses: actions/checkout@v4

- uses: devops-maturity/devops-maturity-action@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    # file, readme-path, pr-branch, pr-title … all have sensible defaults

Required job permissions:

permissions:
  contents: write
  pull-requests: write
Original prompt

I want to create a GitHub action to automatic check devops-maturity.yml when it was update and use devops-maturity CLI to generate new badges and create pull request for reviews on GitHub.

Copilot AI changed the title [WIP] Add GitHub action to check devops-maturity.yml and generate badges feat: GitHub Action to auto-update devops-maturity badges and open PRs Apr 11, 2026
Copilot AI requested a review from shenxianpeng April 11, 2026 18:08
@shenxianpeng
shenxianpeng marked this pull request as ready for review April 11, 2026 18:16
@shenxianpeng shenxianpeng added the enhancement New feature or request label Apr 11, 2026
@shenxianpeng
shenxianpeng merged commit 9480f23 into main Apr 11, 2026
2 of 3 checks passed
@shenxianpeng
shenxianpeng deleted the copilot/create-github-action-for-devops-maturity branch April 18, 2026 18:44
@shenxianpeng shenxianpeng added minor A minor release major A major release and removed minor A minor release labels May 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request major A major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants