-
Notifications
You must be signed in to change notification settings - Fork 2
/
bot-schedule.yaml
51 lines (42 loc) · 1.39 KB
/
bot-schedule.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: bot-schedule
on:
workflow_dispatch:
schedule:
- cron: '*/30 * * * *'
jobs:
bot-schedule:
runs-on: macOS-latest
env:
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 }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache gdal and macOS system dependencies
id: id_cache_gdal
uses: actions/cache@v3
env:
cache-name: cache-gdal
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.chache-name }}-${{ hashFiles('**/gdal') }}
restore-keys: |
${{ runner.os }}-build-${{ env.chache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install gdal and macOS system dependencies
if: steps.id_cache_gdal.outputs.cache-hit != 'true'
run: |
brew install geos
brew install proj
brew install gdal
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.1.1'
- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
- name: Run bot
run: Rscript R/bot_script.R