feat: json follow feed + github actions to post
This commit is contained in:
parent
55b45b8305
commit
02e444e25e
4 changed files with 67 additions and 0 deletions
19
.github/workflows/manual-post.yaml
vendored
Normal file
19
.github/workflows/manual-post.yaml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: Manual follow feed to Mastodon
|
||||
on: [workflow_dispatch]
|
||||
jobs:
|
||||
JSONFeed2Mastodon:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Feed to Mastodon
|
||||
uses: nhoizey/github-action-feed-to-mastodon@v2
|
||||
with:
|
||||
feedUrl: "https://coryd.dev/follow.json"
|
||||
mastodonInstance: "https://social.lol"
|
||||
mastodonToken: ${{ secrets.MASTODON_TOKEN }}
|
||||
testMode: true
|
||||
- name: Pull any changes from Git
|
||||
run: git pull
|
||||
- name: Commit and push
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
21
.github/workflows/scheduled-post.yaml
vendored
Normal file
21
.github/workflows/scheduled-post.yaml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
name: Scheduled follow feed to Mastodon
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
jobs:
|
||||
JSONFeed2Mastodon:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Feed to Mastodon
|
||||
uses: nhoizey/github-action-feed-to-mastodon@v2
|
||||
with:
|
||||
feedUrl: "https://coryd.dev/follow.json"
|
||||
mastodonInstance: "https://social.lol"
|
||||
mastodonToken: ${{ secrets.MASTODON_TOKEN }}
|
||||
testMode: true
|
||||
- name: Pull any changes from Git
|
||||
run: git pull
|
||||
- name: Commit and push
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
Reference in a new issue