Run Tweet Script #173
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: 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' | |
message: 'Update logs' | |
default_author: github_actions | |
push: true |