Skip to content

run main.py

run main.py #2133

Workflow file for this run

name: run main.py
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
update-xml:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
clean: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Script
run: python main.py
- name: Commit and push changes
env:
TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
git add feed.xml
git diff-index --quiet HEAD || git commit -m "Daily update of feed.xml"
git pull origin main --rebase || git rebase --abort
git push https://x-access-token:${TOKEN}@github.com/srdobolo/XML-Feed-From-jobPosting-Strutured-Data.git