๐ฌ Quote of the Day: "Know what's weird? Day by day, nothing seems to change, but pretty soon.. Everything is Different."
This action updates a README file with a quote from the Quote REST API.
Name | Description | Required? |
---|---|---|
category | Quote category to fetch. Default is 'inspire'. Other possible values: management, sports, life, funny, love, art, students | No |
readme_path | Path of the readme file to update. Default is './README.md'. | No |
- Add the following lines in the file where quote will be updated.
<!-- start quote --> and <!--- end quote -->
- Create a workflow
name: Update README with QOTD
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # triggers every midnight
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install node dependencies
run: npm install
- name: Run QOTD action
uses: ./ # Uses an action in the root directory
with:
category: 'life'
- name: Commit and push update
run: |-
git config --global user.email "[email protected]"
git config --global user.name "Quote-Bot"
git add -A
git commit -m "Added QOTD from GitHub Actions"
git push