Rainbow readme badges generated automatically for your readme
repo
and user
scope from hereenabling the
repo
scope seems DANGEROUS
but this GitHub Action only will allow committing the updated readme.
- You can use this example to work it out
GH_TOKEN=<your github access token>
This Action is best run on every push but dont worry it will only commit when colours are updated.
Add a comment to your README.md
like this:
<!--START_SECTION:colourise-->
<!--END_SECTION:colourise-->
These lines will be our entry-points for where the colour values will be modified and should work with multiple sections. An example can be seen here.
You’ll need to get a GitHub Access Token with a repo
and user
scope and save it in the Repo Secrets GH_TOKEN = <Your GitHub Access Token>
Here is Sample Workflow File for running it:
name: Rainbow badges
# runs after every push.
on: push
jobs:
update-readme:
name: Update Readme with Rainbow badges
runs-on: ubuntu-latest
steps:
- uses: Parply/readme-badge-colouriser@master
with:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
If you want to change options, you can add multiple FLAGS
in your workflow file.
- uses: Parply/readme-badge-colouriser@master
with:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
SATURATION: "0.5"
AUTHOR: "Parply"
SATURATION
Saturation used when creating the rainbow palette. Defaults to 1.0
LUMINOSITY
Luminosity used when creating the rainbow palette. Defaults to 0.5
AUTHOR
Name of the author committing to the readme. Defaults to rainbow bot
BRANCH
Branch to commit to. Defaults to master
COMMIT_MESSAGE
Message when committing. Defaults to Updated with rainbow badges
Made with Python 🐍.