DEV Community 👩‍💻👨‍💻

Cover image for Quote - README, See wonderful quotes/fun-facts on your GitHub Profile README
Siddharth Chandra
Siddharth Chandra

Posted on

Quote - README, See wonderful quotes/fun-facts on your GitHub Profile README

Yep, you read it right ! There is a GitHub Action that lets you put an awe-inspiring fact or a famous quote on your GitHub Profile README, so that every morning, when you begin your work, you laugh, feel inspired and be determined.


The result before diving into steps:

Sample Output

Without dragging it further, keeping it short and simple, here are the steps:

1. Update your Profile README.md file.

Add following in you Profile README.md, wherever you want quotes/fun-facts to appear. Do not forget to commit the file 😉

<!--STARTS_HERE_QUOTE_README-->
<!--ENDS_HERE_QUOTE_README-->
Enter fullscreen mode Exit fullscreen mode

It should look something like this:

Step 1 Image

Profile README.md should be present in <username>/<username> repository. Need to know more about profile repository/README, check out official docs.

2. Add workflow (yaml) file.

Now, click on Actions tab on top of your profile repository <username>/<username>.

Step 2 Actions Tab

Then, set up a workflow yourself.

Step 2 Setup Workflow

Remove all the pre-entered contents of the yaml file and add the following:

name: Update Quote Readme

on:
  workflow_dispatch:
  schedule:
    # Runs at 2 UTC everyday
    - cron: "0 2 * * *"

jobs:
  update-readme:
    name: Update Quote README
    runs-on: ubuntu-latest
    steps:
      - uses: siddharth2016/quote-readme@main
        with:
          COMMIT_MESSAGE: <your-commit-message>       # default - Update with quote-readme
          OPTION: both            # default - both, can be one of (quote, funfact, both), if 'both' then will display either a quote or a fact
Enter fullscreen mode Exit fullscreen mode

COMMIT_MESSAGE and OPTION variables are not needed, unless you want custom commit message and do not want to see either quotes or fun-facts on README.md

Name this yaml file as update-quote-readme.yml or whatever suits you best and commit the workflow yaml file.

3. Test your action and see the Magic 🧙‍♂️

Now, again go to Actions tab.

Step 3 Actions Tab

Click Update Quote Readme under workflows.

Step 3 Update Quote Readme

Then Run workflow->Run workflow, wait for it to complete.

Step 3 Run Workflow

And once the action is done then check your Profile README for a wonderful quote or a fun-fact !

Step 3 Result

Additionally you can link it back to the original repository to show your support for this action !

Change README.md like this

<a href='https://github.com/marketplace/actions/quote-readme'>
<!--STARTS_HERE_QUOTE_README-->
<!--ENDS_HERE_QUOTE_README-->
</a>
Enter fullscreen mode Exit fullscreen mode

Well, that was it, if you followed these steps you would be seeing an awe-inspiring quote or a fact on your Profile README.

Share your Profile README quotes/facts screenshot in the comments below 👇

If you faced any issues, please comment here or create an issue on this repository.

If you liked this not-so-useful action, then give it a star ⭐

If you loved this not-so-useful action, then let's connect and contribute to make this a little bit useful !

Just starting your Open Source Journey ? Do not forget to check out Hello Open Source !

Namaste 🙏

Top comments (0)

🌱 DEV runs on 100% open source code that we started called Forem.

 
You can contribute to the codebase or host your own.