-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.05 KB
/
run-script.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
37
38
39
name: Run Tweet Script
on:
schedule:
- cron: '0 */1 * * *'
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create logs directory
run: mkdir -p logs
- name: Run script in container
uses: docker://ghcr.io/anthonyrussano/x-rss/tweet-script-base:latest
env:
OAUTH_CONSUMER_KEY: ${{ secrets.OAUTH_CONSUMER_KEY }}
OAUTH_CONSUMER_SECRET: ${{ secrets.OAUTH_CONSUMER_SECRET }}
OAUTH_ACCESS_TOKEN: ${{ secrets.OAUTH_ACCESS_TOKEN }}
OAUTH_ACCESS_TOKEN_SECRET: ${{ secrets.OAUTH_ACCESS_TOKEN_SECRET }}
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
with:
args: python .
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
add: 'posted_articles.json twitter_bot.log'
message: 'Update logs'
default_author: github_actions
push: true