-
Notifications
You must be signed in to change notification settings - Fork 42
44 lines (37 loc) · 1.16 KB
/
generate_files.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
42
43
44
name: Generate CSV and README
on:
push:
branches:
- master
paths:
- 'src/ser-datasets.json'
jobs:
generate_files:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7' # Specify the Python version you need
- name: Install dependencies
run: |
cd src
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script to generate CSV and README
run: |
cd src
python generate_files.py
- name: Commit and push changes
if: github.event_name == 'push'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git pull origin master # Pull the latest changes from the remote repository
git add src/ser-datasets.csv README.md
git commit -m 'Automatically generated CSV and README from JSON update'
git push origin HEAD:master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}