diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml index 78a294be..586db3bf 100644 --- a/.github/workflows/cpp-linter.yml +++ b/.github/workflows/cpp-linter.yml @@ -1,3 +1,8 @@ +# Runs the latest release on the demo files, the way users run the action. +# Changes to the action itself are tested by self-test.yml. +# Keep this file: older READMEs told users to add the status badge of this +# workflow (actions/workflows/cpp-linter.yml/badge.svg) to their own README, +# and those badges break if the workflow is removed or renamed. name: cpp-linter on: @@ -19,7 +24,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: cpp-linter/cpp-linter-action@main + - uses: cpp-linter/cpp-linter-action@8120e05c7fbd25fa09fa93424ec49f55f7b304ab # v2.23.1 id: linter continue-on-error: true env: diff --git a/README.md b/README.md index 235ddede..3b0fe29e 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,23 @@ clang tools. Linux workflows that use a specific [`container`][gh-container-synt packages installed first. [Required tools][tools-doc] lists them and the sources each runner installs the clang tools from. +## Add a badge + +Show that your project is linted with cpp-linter by adding this badge to your README: + +[![C/C++ lint: cpp-linter](https://img.shields.io/badge/C%2FC%2B%2B%20lint-cpp--linter-ffc20a?labelColor=454a63)](https://github.com/cpp-linter/cpp-linter-action) + +```markdown +[![C/C++ lint: cpp-linter](https://img.shields.io/badge/C%2FC%2B%2B%20lint-cpp--linter-ffc20a?labelColor=454a63)](https://github.com/cpp-linter/cpp-linter-action) +``` + +To also show the result of your own lint runs, add the status badge of the workflow from +[Quick start](#quick-start), replacing `OWNER/REPO` with your repository: + +```markdown +[![cpp-linter](https://github.com/OWNER/REPO/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/cpp-linter.yml) +``` + ## Used by Projects from these organizations run cpp-linter-action on their default branch: