Skip to content

update events Bot

update events Bot #39

Workflow file for this run

name: RubyStackNews Bot
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "1 0 * * 0"
permissions:
contents: write
jobs:
bot:
runs-on: ubuntu-latest
environment: demo
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- run: sudo apt-get update && sudo apt-get install -y libgd-dev
- run: gem install ruby-libgd
- run: ruby demo/rsn_events_bot/social_event_image.rb
- name: Commit image
if: github.ref == 'refs/heads/main'
run: |
git config --global user.name "rsn-bot"
git config --global user.email "ggerman@gmail.com"
git add demo/rsn_events_bot/rsn_events.png
git commit -m "Update Events image" || echo "no changes"
git push
- run: ruby demo/rsn_events_bot/publish.rb
env:
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
MASTODON_INSTANCE: https://ruby.social