-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwriting.yml
36 lines (32 loc) · 1.21 KB
/
writing.yml
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
# This is a basic workflow to help you get started with Actions
name: Lazy Tweeter Writing
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
schedule:
- cron: '0 12,17 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
job1:
name: Post something to Twitter
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.2
- name: Post something to Twitter
env:
TW_CONSUMER_KEY: ${{ secrets.TW_CONSUMER_KEY}}
TW_CONSUMER_SECRET: ${{ secrets.TW_CONSUMER_SECRET }}
TW_ACCESS_TOKEN_KEY: ${{ secrets.TW_ACCESS_TOKEN_KEY }}
TW_ACCESS_TOKEN_SECRET: ${{ secrets.TW_ACCESS_TOKEN_SECRET }}
run: |
npm install && node twitter.js writing
- name: Commit and push changes
run: |
git config --global user.name "theonemule"
git config --global user.email "blaize@example.com"
git add -A
git commit -m "New Tweet"
git push