Skip to content

Sh1nku/badgestore-update-badge-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badgestore-update-badge-action

Lines of code

Update a badge on badgestore.dev (or self-hosted instance)

Generated based on dbanty/rust-github-action-template

Inputs

Name Description Default
left-label The left label of the badge <none>
right-label The right label of the badge <none>
left-color Hex color <none>
right-color Hex color <none>
right-color Hex color <none>
read-write-key Read and Write keys in format "read_key:write_key" <none>
api-url The api url of the badgestore https://api.badgestore.dev

Examples:

  • left-label:
    • Lines of code
  • right-label
    • -100
  • left-color
    • 555555
  • right-color
    • 999999

Outputs

Name
left-label
right-label
left-color
right-color
read-key

Example usage

  example_action:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - id: loc
        name: Count lines of code
        uses: Sh1nku/count-loc-action@v1
        with:
          excluded: "*.json,*.yaml"
      - uses: Sh1nku/badgestore-update-badge-action@v1
        name: Update badge
        id: badge
        with:
          right-label: ${{ steps.loc.outputs.Total_code }}
          read-write-key: ${{ secrets.ACTION_RW_KEY }}
      - name: Verify content changed
        if: steps.badge.outputs.right-label != steps.loc.outputs.Total_code
        run: echo "The output of the badge was not equal to the input ${{ steps.badge.outputs.right-label}} - ${{ steps.loc.outputs.Total_code}}" && exit 1
      - uses: koki-develop/hub-purge-action@v1

About

Update a badge on badgestore.dev

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages