Skip to content

Fix readme success badge color #9

Fix readme success badge color

Fix readme success badge color #9

Workflow file for this run

name: Check links in README and generate badges
on:
workflow_call:
push:
paths:
- '.github/workflows/readme.yaml'
- 'README.md'
schedule:
# run twice a month (on 1st and 15th of every month at 12:00 UTC)
- cron: '0 12 1,15 * *'
jobs:
linkinator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Linkinator
uses: JustinBeckwith/linkinator-action@v1
badges:
runs-on: ubuntu-latest
needs: linkinator
steps:
- name: Set values for failure badge
if: ${{ needs.linkinator.result == 'failure' }}
run: |
echo "MESSAGE=failing" >> $GITHUB_ENV
echo "COLOR=red" >> $GITHUB_ENV
- name: Set values for success badge
if: ${{ needs.linkinator.result == 'success' }}
run: |
echo "MESSAGE=passing - $(date --utc '+%b %d %Y at %R UTC')" >> $GITHUB_ENV
echo "COLOR=#44cc11" >> $GITHUB_ENV
- name: Create badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: ${{ vars.GIST_ID }}
filename: braille_display_readme_badge.json
label: Readme links check
message: ${{ env.MESSAGE }}
color: ${{ env.COLOR }}
style: flat-square