Skip to content

cron_job

cron_job #2692

Workflow file for this run

name: cron_job
# Controls when the workflow will run
on:
# cron job every 2 hours
schedule:
- cron: '0 */2 * * *'
# 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:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repository
uses: actions/checkout@v3
with:
token: ${{ secrets.WORK_TOKEN }}
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: ls_show
run: |
python main.py
env:
U_NAME: ${{ secrets.U_NAME }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
OLLAMA_BASE_URL: ${{ secrets.OLLAMA_BASE_URL }}
- name: PUSH
env:
U_NAME: ${{ secrets.U_NAME }}
U_EMAIL: ${{ secrets.U_EMAIL }}
run: |
pwd
git config --local user.name "${U_NAME}"
git config --local user.email "${U_EMAIL}"
git status -s
git add index.md
git add log.txt
git add 'markdown_files/*'
git add 'feeds/*'
export TZ='Asia/Kolkata'
git commit -m "Github Auto Build at `date +"%Y-%m-%d %H:%M"`"
echo "======git push===="
git push