🔗 → 🐘 POSSE links to Mastodon #2826
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: '🔗 → 🐘 POSSE links to Mastodon' | |
on: | |
schedule: | |
# https://crontab.guru/#37_1/3_*_*_* | |
- cron: '37 1/3 * * *' | |
workflow_dispatch: | |
env: | |
TYPE: 'links' | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
Mastodon: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 📥 | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
- name: POSSE ${{ env.TYPE }} to Mastodon 🦣 | |
uses: nhoizey/github-action-feed-to-mastodon@canary | |
with: | |
feedUrl: 'https://nicolas-hoizey.com/feeds/mastodon/${{ env.TYPE }}.json' | |
mastodonInstance: ${{ secrets.MASTODON_INSTANCE }} | |
mastodonToken: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
cacheFile: 'posse-mastodon-${{ env.TYPE }}.json' | |
cacheTimestampFile: 'posse-mastodon-${{ env.TYPE }}-timestamp.json' | |
# 3 hours between links | |
globalDelayToots: 180 | |
nbTootsPerItem: 2 | |
# 8.5 days between same links | |
delayTootsSameItem: 12240 | |
- name: Pull any changes from Git 📥 | |
run: git pull | |
- name: Commit and push 📤 | |
uses: stefanzweifel/git-auto-commit-action@v5 |