|
1 |
| -[](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-twitter.yml) |
2 |
| - |
3 | 1 | <div align="center">
|
4 | 2 |
|
5 | 3 | <h1> Shiba Every Hour </h1>
|
6 | 4 |
|
7 |
| - <p> A GitHub Action which posts a picture of a Shiba to Twitter every hour.</p> |
| 5 | + <p>posting shibas around the the inter-webs hourly</p> |
8 | 6 |
|
9 | 7 | <img src="https://user-images.githubusercontent.com/18376481/90677906-ed53a180-e255-11ea-9df6-a2f6a59f0154.png">
|
10 | 8 |
|
11 | 9 | <p>wow</p>
|
12 | 10 |
|
13 | 11 | </div>
|
14 | 12 |
|
15 |
| -# Ok, seriously why? |
16 |
| - |
17 |
| -I like Shiba's ok? |
18 |
| - |
19 |
| -# But Seriously... |
20 |
| - |
21 |
| - |
22 |
| -There probably is a legit use case somewhere here... You just need to look harder. |
23 |
| -- Perhaps you want to tweet your application service status every hour via a health check API? |
24 |
| -- You could post a tweet every time is a PR is merged into your master branch? |
25 |
| -- You could post cat images every hour instead!? |
26 |
| - |
27 |
| -The sky's the limit! |
28 |
| - |
29 |
| -# Developing Locally |
30 |
| - |
31 |
| -1. Clone this repo to your machine. |
32 |
| - |
33 |
| -2. Create a `.env` in the root directory. |
34 |
| - |
35 |
| -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/ . |
36 |
| - |
37 |
| -4. Your `.env` file should look something like this. |
38 |
| -``` |
39 |
| -CONSUMER_KEY = hvdVM7ZGshibasaresogreat3ZvE5tXh0E4h |
40 |
| -CONSUMER_SECRET = 4ez9dEyAeGtbnXeca-ha-ha-M0i5wI02e1vPa |
41 |
| -ACCESS_TOKEN_KEY = 8185583706135142-not-a-real-key-gPwxau3Yi0adA |
42 |
| -ACCESS_TOKEN_SECRET = wow-fsaa2muchwoof |
43 |
| -``` |
44 |
| -5. You can then run `npm run dev-shibe` to run the script locally. |
45 |
| - |
46 |
| -# Modifying the Action or Script |
47 |
| - |
48 |
| -Feel free to adapt this script for your own purposes. |
49 |
| - |
50 |
| -The hourly schedule is configured in `./.github/workflows/post-shibe.yml`. |
51 |
| - |
52 |
| -All the logic to fetch a Shiba image and post to Twitter is in `./index.js`. |
53 |
| - |
54 |
| - |
55 |
| -# Publishing to Github |
56 |
| - |
57 |
| -> ⚠ Do NOT publish your `.env` to GitHub. Doing this will let anyone send posts to your Twitter account on your behalf. |
58 |
| -
|
59 |
| -1. Add your Twitter API as [GitHub secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) like so: |
60 |
| - |
61 |
| - |
62 |
| - |
63 |
| - |
64 |
| -Happy hacking 🤓. |
| 13 | +| site | status | |
| 14 | +|------------|----------------| |
| 15 | +| X(Twitter) | [](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-twitter.yml) | |
| 16 | +| Mastodon | [](https://github.com/chiubaca/shiba-every-hour/actions/workflows/post-shibe-mastodon.yml) | |
| 17 | +| Bluesky | coming soon... | |
0 commit comments