Last active
March 16, 2022 23:15
-
-
Save ziadoz/20a7fd71770839b1a0daa87a09779dd9 to your computer and use it in GitHub Desktop.
Run TwitterDelete using Docker Compose
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: Delete Tweets | |
on: | |
workflow_dispatch: | |
schedule: | |
# Once every month | |
# @see: https://crontab.guru/#0_0_1_*_*_* | |
- cron: "0 0 1 * *" | |
jobs: | |
delete: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone TwitterDelete | |
uses: actions/checkout@master | |
with: | |
repository: MikeMcQuaid/TwitterDelete | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@master | |
with: | |
ruby-version: "2.6" | |
bundler-cache: true | |
- name: Run TwitterDelete | |
run: bundle exec twitter_delete.rb --force | |
env: | |
TWITTER_USER: ${{ secrets.TWITTER_USER }} | |
TWITTER_DAYS: ${{ secrets.TWITTER_DAYS }} | |
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} |
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
version: "3.9" | |
services: | |
ruby: | |
image: ruby:3.0 | |
working_dir: /usr/src/myapp | |
command: bash -c 'bundle install && ruby twitter_delete.rb --archive=twitter/data/tweet.js --user=<username> --days=7 --olds=99999 --rts=100 --favs=100 --force' | |
environment: | |
TWITTER_CONSUMER_KEY: xxx | |
TWITTER_CONSUMER_SECRET: xxx | |
TWITTER_ACCESS_TOKEN: xxx | |
TWITTER_ACCESS_TOKEN_SECRET: xxx | |
volumes: | |
- .:/usr/src/myapp | |
networks: | |
- default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment