Social Media Monitor #4877
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: "Social Media Monitor" | |
on: | |
schedule: | |
- cron: "*/5 * * * *" | |
workflow_dispatch: | |
# Limit concurrent runs and cancel in-progress ones | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
AWS_REGION: us-west-2 | |
jobs: | |
monitor-social: | |
runs-on: ubuntu-latest | |
timeout-minutes: 4 # Ensure job completes before next schedule | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 # Updated to latest version | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 # Updated to latest version | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Install grass | |
uses: jaxxstorm/action-install-gh-release@master | |
with: | |
repo: jaxxstorm/grass | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Added for rate limit handling | |
- name: Run grass | |
env: | |
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }} | |
DISCORD_CHANNEL_ID: ${{ secrets.DISCORD_CHANNEL_ID }} | |
REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID }} | |
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }} | |
REDDIT_PASSWORD: ${{ secrets.REDDIT_PASSWORD }} | |
REDDIT_USERNAME: ${{ secrets.REDDIT_USERNAME }} | |
SOCIAL_SEARCH_TABLE_NAME: ${{ secrets.SOCIAL_SEARCH_TABLE_NAME }} | |
BSKY_USERNAME: ${{ secrets.BSKY_USERNAME }} | |
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }} | |
HACHYDERM_IO_CLIENT_ID: ${{ secrets.HACHYDERM_IO_CLIENT_ID }} | |
HACHYDERM_IO_CLIENT_SECRET: ${{ secrets.HACHYDERM_IO_CLIENT_SECRET }} | |
HACHYDERM_IO_ACCESS_TOKEN: ${{ secrets.HACHYDERM_IO_ACCESS_TOKEN }} | |
FEDIVERSE_INSTANCES: https://hachyderm.io | |
run: | | |
grass \ | |
--db=dynamodb \ | |
--keyword=tailscale \ | |
--keyword=leebriggs \ | |
--keyword=leebriggs.co.uk \ | |
--bot=print \ | |
--bot=discord \ | |
--searchers=reddit \ | |
--searchers=hackernews \ | |
--searchers=bluesky \ | |
--searchers=youtube \ | |
--searchers=fediverse |