Skip to content

Credly Badges

Actions
Add Credly badges to your README
0.4.1
Latest
Star (1)

Tags

 (1)

credly-badges

goreleaser

A GitHub action to display your Credly badges in your personal GitHub profile README!

Inspired by this repo.

Note that this GitHub action only supports fetching badges from Credly.

How-to

  1. Add the following to your github.com/<owner>/<repo>/README.md add the following:
<!--START_BADGES:badges-->
<!--END_BADGES:badges-->
  1. In your repository create a workflows directory:
mkdir -p .github/workflows
  1. Create a file called e.g. credly-badges.yaml with the following contents:
name: "Credly Badges"

on:
  schedule:
    - cron: "0 0 * * *"

jobs:
  credly-badges:
    name: "Update README with Credly badges"
    runs-on: ubuntu-latest

    steps:
      - name: Update
        uses: mikejoh/credly-badges@main
        with:
          CREDLY_USERNAME: <Your Credly username>
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COMMIT_MESSAGE: "Update Credly badges!"

Note that you might want to replace @main and pin to a specific version, see the Releases page for available released versions.

If you want to try it out, without waiting for the trigger to be scheduled, you can add another trigger e.g.:

...
on:
  push:
...

And push a commit to your profile repository, in the Actions tab of your repository you shall now see that it has triggered.

Test locally

  1. Build:
go build -o credly-badges .
  1. Create a GitHub token.
  2. Run:
export INPUT_GITHUB_TOKEN="token"
./credly-badges -credly-username <username> -gh-username <GitHub username> -gh-token $INPUT_GITHUB_TOKEN

Credly Badges is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Add Credly badges to your README
0.4.1
Latest

Tags

 (1)

Credly Badges is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.