GitHub Action
date-box
🗓 Update a pinned gist to contain your anniversaries and countdown days (or hours)
📌 This project is inspired by waka-box and lang-box.
📌 For more pinned-gist projects like this one, check out: https://github.com/matchai/awesome-pinned-gists.
- Create a new public GitHub Gist (https://gist.github.com)
- Create a token with the
gist
scope and copy it. (https://github.com/settings/tokens/new)
-
Fork this repo
-
Edit the environment variable in
.github/workflows/schedule.yml
:- GIST_ID: The ID portion from your gist url:
https://gist.github.com/kf-liu/
7de2a55824ec5e8a78ebc3c57e4ca82b
.
- GIST_ID: The ID portion from your gist url:
-
Go to the repo Settings > Secrets
-
Add the following environment variables:
- GH_TOKEN: The GitHub token generated above.
- RECORDS: Your anniversary and countdown days. (The format is below.)
((cron|moment)( _ (event))? | )|*(cron|moment)( _ (event))?
| | | | |
| | | | |
| | | | +- - - ' | ': record separator
| | | |
| | | +- - - - - - (event): what you want to record
| | |
| | +- - - - - - - - - ' _ ': the time and event separator
| |
+- - -+- - - - - - - - - - - - (time): when you want to record
Currently, two formats are supported: cron
(for loop event) and moment
(for single event).
- corn: to schedule a loop event to countdown at specific UTC times using POSIX cron syntax.
- e.g.
0 0 1 * *
0 0 * * 0
- e.g.
- moment: to schedule a single event to countdown using moment.
- e.g.
2022-10-22
- e.g.
One record
consists of one time
and one event
, and thay are connected by _
(a space, an underscore, and a space). Each record will be displayed as a line in your gist.
e.g.
0 0 * * 0,6 _ WEEKEND
0 0 10 * * _ PAYDAY
2022-10-22 _ CREATE THIS REPO
0 0 28 12 * _ MY BIRTHDAY
Of course, event
is not required, you can just give the time. (_
is not required as well).
This is the final format of records: Connect a series of records with |
(a space, an vertical bar, and a space).
e.g.
0 0 * * 0,6 _ WEEKEND | 0 0 10 * * _ PAYDAY | 2022-10-22 _ CREATE THIS REPO | 0 0 28 12 * _ MY BIRTHDAY
.
- The countdown to the next holiday.
You are the lucky visitor here! Thank you for your 👀attention and ✨star!