Merge pull request #61 from SuperKogito/add-more-datasets #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |