-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.02 KB
/
actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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