DEV Community

loading...
Cover image for Shiba Every Hour -A Twitter bot powered by GitHub Actions

Shiba Every Hour -A Twitter bot powered by GitHub Actions

chiubaca profile image Alex Chiu Updated on ・1 min read

My Workflow

My GitHub action posts a new picture of a Shiba to ShibaEveryHour every hour. The bot was previously working off an Azure serverless function. But for this hackathon, I have moved it into a GitHub Action.

Submission Category:

If it's not obvious already, this is one for the Wacky Wildcards 😂.

Yaml File or Link to Code

GitHub logo chiubaca / shiba-every-hour

GitHub Action to post a Shiba to Twitter every hour. Because why not? 🐕

Shiba Every Hour

A GitHub Action which posts a picture of a Shiba to Twitter every hour.

wow

Ok, seriously why?

I like Shiba's ok?

But Seriously...

There probably is a legit use case somewhere here... You just need to look harder.

  • Perhaps you want to tweet your application service status every hour via a health check API?
  • You could post a tweet every time is a PR is merged into your master branch?
  • You could post cat images every hour instead!?

The sky's the limit!

Developing Locally

  1. Clone this repo to your machine.

  2. Create a .env in the root directory.

  3. Inside the .env you will need to create four variables. CONSUMER_KEY , CONSUMER_SECRET, ACCESS_TOKEN_KEY and ACCESS_TOKEN_SECRET. These need to be populated with your own Twitter API keys which you can get by signing up at https://developer.twitter.com/ .

  4. Your .env file should look something like this.

CONSUMER_KEY =

Additional Resources / Info

Discussion (0)

pic
Editor guide