GitHub Action
Comic Strip Readme
This GitHub Workflow updates your readme with the provided comic strips daily. The current comics available are:
Add a comment to your README.md
:
<!--START_SECTION:comicstrip-->
<!--END_SECTION:comicstrip-->
The images will appear between the comments
If you're executing the workflow on your Profile Repository (<username>/<username>
)
You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.
Follow the bellow steps:
- Go to your
<username>/<username>/actions
, hitNew workflow
,set up a workflow yourself
, delete all the default content github made for you. - Copy the following code and paste it to your new workflow you created at step 1:
name: Comic Strip Readme
on:
workflow_dispatch:
schedule:
# Runs at 8am UTC every Monday, Wednesday, Friday
- cron: "0 8 * * 1,3,5"
jobs:
update-readme:
name: Update README with Comic Strip
runs-on: ubuntu-latest
steps:
- uses: ism0080/comicstrip-readme@v1.2
with:
SHOW_XKCD: true
This will add the XKCD comics to your README.md
at 8am UTC every Monday, Wednesday and Friday
- Add a comment to your
README.md
like this:
<!--START_SECTION:comicstrip-->
<!--END_SECTION:comicstrip-->
-
Go to Workflows menu (mentioned in step 1), click
Comic Strip Readme
, clickRun workflow
. -
Go to your profile page. you will be able to see it.
If you're executing the workflow on another repo other than <username>/<username>
You'll need to get a GitHub Access Token with a repo
scope and save it in the Repo Secrets GH_TOKEN = <Your GitHub Access Token>
Here is Sample Workflow File for running it:
name: Comic Strip Readme
on:
schedule:
# Runs at 8am UTC every Monday, Wednesday, Friday
- cron: "0 8 * * 1,3,5"
jobs:
update-readme:
name: Update README with Comic Strip
runs-on: ubuntu-latest
steps:
- uses: ism0080/comicstrip-readme@v1.2
with:
SHOW_XKCD: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
REPOSITORY: <username/username> # optional, By default, it will automatically use the repository who's executing the workflow.
- You can specify a commit message to override the default "Updated readme comic strip". Add
COMMIT_MESSAGE
with the commit message you want
with:
COMMIT_MESSAGE: Readme updated
NOTE: Sometimes the comic may not be new at the time of the cron job running