DEV Community

Ghani Rafif
Ghani Rafif

Posted on

Debris: Fetch Random Fact to Your Readme

I like to know some fun fact. And usually I know it from wikipedia. But sometime I'm just to lazy to open wikipedia. So I thought why don't I just see the fact from site that I often visit, that's github. And so I decided to make this simple github action to fetch random fact to my Readme profile.

My Workflow

I use this action on my github profile readme. You can see it here

Did you know that

"Babies are born without kneecaps. They don`t appear until the child reaches 2-6 years of age."

I am 🤔

Hello I'm just your regular undergraduate student who likes Japan Pop Culture. I use Debian as my main OS. Sometimes I switch between XFCE, Openbox, and AwesomeWM as my Window Manager.

My Working Environment 😎

Curently Learning 🤓

My Statistics




Submission Category:

Wacky Wildcards

Yaml File or Link to Code

on:
  push:
    branches: master
  schedule:
    - cron: '30 17 * * *'

jobs:
  build:
    name: Update Readme.md
    runs-on: ubuntu-latest
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - uses: actions/checkout@v2
      - name: Debris action
        uses: ekickx/debris@master 
        with:
          fact_args: 'today'

GitHub logo ekickx / debris

Simple bash github action to fetch random fact to your Readme.md

Why debris

This github action will fetch random fact that is useless (or maybe not) just like debris

Currently it only fetches fact from here

Usage

Readme Setting

On your readme put this comment:

<!--START_SECTION:debris-->
<!--END_SECTION:debris-->

The github action will put the output between those two comment section

Github Token

  • Go to your Settings > Developer settings > Personal access tokens and create new token with repo and user scope

  • Copy the token

  • Goto your repo's Settings > Secrets and then create new secret with the name GITHUB_TOKEN and the token you was copied as the value

    If you need more info, you can see the github documentaion

Workflow Setting

on
  push
    # Run at every push on branches master
    branches: master
  schedule
    # Or every 1.30 am UTC
    - cron: '30 1 * * *'

jobs:
  update-readme
…

Top comments (0)