narrowbotR #16991
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: narrowbotR | |
on: | |
schedule: | |
- cron: '19 8-20/4 * * *' | |
jobs: | |
narrowbotR-post: | |
runs-on: ubuntu-latest | |
env: | |
FLICKR_API_KEY: ${{ secrets.FLICKR_API_KEY }} | |
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} | |
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} | |
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
MAPBOX_PAT: ${{ secrets.MAPBOX_PAT }} | |
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install cURL Headers | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
- name: Install packages | |
run: Rscript -e 'source("R/pkg_install.R")' -e 'install_packages()' | |
- name: Cruise the canals | |
run: Rscript narrowbot.R | |
- name: Commit log | |
run: | | |
git config --local user.name actions-user | |
git config --local user.email "actions@github.com" | |
git add narrowbotr.log | |
git commit -m "squash! AUTOBOTLOG" | |
git push origin main | |
env: | |
REPO_KEY: ${{secrets.GITHUB_TOKEN}} | |
username: github-actions |