Skip to content

Update actions.yml

Update actions.yml #2

Workflow file for this run

name: Run Python script and log output
on:
schedule:
- cron: '0 9 01 * *' # At 09:00 on day-of-month 1.
push:
branches:
- main
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # Instalira pakete iz requirements.txt
- name: Run Python script
run: |
python main.py # Pokreće Python skriptu i upisuje izlaz u open-source.txt
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add open-source.txt
git diff-index --quiet HEAD || (git commit -a -m "Update open-source.txt log" --allow-empty)
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}