Skip to content

My Workflow Run Bot #10101

My Workflow Run Bot

My Workflow Run Bot #10101

Workflow file for this run

name: My Workflow Run Bot
on:
push:
branches: [master]
workflow_dispatch: # for manual workflow trigger
schedule:
- cron: "0 * * * *" # runs at every one hours
jobs:
run-python-script:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install packages from requirements.txt
run: pip install -r requirements.txt
- name: Run script
env:
TOKEN: ${{ secrets.TOKEN }}
API_NEWS: ${{ secrets.API_NEWS }}
run: |
python main.py
git config --global user.email "${{ secrets.USER_EMAIL }}"
git config --global user.name "${{ secrets.USER_NAME }}"
git add .tmp
git commit -m "Update Text News"
git push origin master