Skip to content

twitter

twitter #782

name: twitter
on:
workflow_run:
workflows: [screenshot]
types:
- completed
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: false
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
manchete-post:
runs-on: macOS-latest
env:
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 }}
GITHUB_PAT: ${{ secrets.PAT_GITHUB }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Install packages
run: |
install.packages("remotes")
remotes::install_cran("rtweet")
install.packages("httr")
shell: Rscript {0}
- name: Create and post tweet
id: retry
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
retry_on: error
continue_on_error: true
command: Rscript twitter.R