Skip to content

🎁 Daily messages for birthday reminders using GitHub Actions

License

Notifications You must be signed in to change notification settings

AnandChowdhary/birthday-reminders-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎁 Birthday Reminders Action

Get daily Telegram messages for birthday reminders using GitHub Actions.

Telegram screenshot

🎈 How it works

Using scheduled workflows, you will receive a Telegram message once every day with a list of birthdays, and once every week with upcoming birthdays you should order gifts for.

πŸ› οΈ Setup

Create a new repository with the following environment variables:

  • TELEGRAM_TOKEN - Bot token
  • TELEGRAM_CHAT_ID - Chat ID

Next, create a birthdays.yml file with a list of birthdays you want to track:

- name: Anand Chowdhary
  day: 29
  month: 12
  year: 1997
- name: Sukriti Kapoor
  day: 15
  month: 9
  gift: true

Each person should have a "name" (string), "month" (number), and "day" (number). Optionally, you can add "year" (number) to find out how many years old they are, "gift" (boolean) for whether or not you want to be reminded to purchase a gift, and "me" (boolean) for a wish for yourself.

Then, create two GitHub Actions workflow files. First, .github/workflows/daily.yml:

name: Daily CI
on:
  schedule:
    - cron: "0 8 * * *"
  workflow_dispatch:
jobs:
  weekly:
    name: Daily birthday reminders
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/[email protected]
      - name: Send message
        uses: AnandChowdhary/birthday-reminders-action@HEAD
        with:
          command: birthdays-today
        env:
          TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
          TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
      - name: Keep alive
        uses: gautamkrishnar/keepalive-workflow@v1

In the above example, we've also included gautamkrishnar/keepalive-workflow to prevent GitHub from disabling scheduled workflows.

And .github/workflows/weekly.yml:

name: Weekly CI
on:
  schedule:
    - cron: "0 8 * * 1"
  workflow_dispatch:
jobs:
  weekly:
    name: Weekly birthday reminders
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/[email protected]
      - name: Send message
        uses: AnandChowdhary/birthday-reminders-action@HEAD
        with:
          command: upcoming-birthdays
        env:
          TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
          TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}

You can manually trigger the workflow to test it out.

πŸ“„ License

About

🎁 Daily messages for birthday reminders using GitHub Actions

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published