Skip to content

jacobkring/go-badges

Repository files navigation

Go Badges

Go Badges is a simple docker action intended to be used in Github Actions for Golang projects. Badges are generated using various inputs and comment tags in your README file.



Go Report Card

Grade: A (82.4%)
Files: 2
Issues: 1
gofmt: 50%
go_vet: 100%
gocyclo: 100%
golint: 100%
license: 100%
ineffassign: 100%
misspell: 100%

Motivation

I contribute to a number of private Golang repos that make it inconvenient or impossible to use 3rd party tools for things like goreportcard.com and generating badges.

Usage

In your README file you should leave comments on the lines that you want the badges to be generated. Checkout the raw README file in this project for an example.

You do not need to include any badge links, they will be generated after the first run.

Coverage

<!---go-badges-coverage-->

Version

<!---go-badges-version-->

Report Card

<!---go-badges-report-card-->

Workflow

In your workflow file you should include the inputs you want generated.

on: [push]

jobs:
  go_badges:
    runs-on: ubuntu-latest
    name: A job to generate badges
    steps:
      - uses: actions/checkout@v2
      - id: badges
        uses: jacobkring/[email protected]
        with:
          version: ${{ steps.version.outputs.tag }}
          report-card: ${{ steps.goreportcard.outputs.reportCard }}
          coverage: ${{ steps.coverage.outputs.coverage }}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

generates readme badges based on input

Resources

License

Stars

Watchers

Forks

Packages

No packages published