Skip to content

Commit

Permalink
restructure workflows and add one for automatic files generation
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperKogito committed Jun 9, 2024
1 parent 2ab4b46 commit 6d34f22
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
File renamed without changes.
40 changes: 40 additions & 0 deletions .github/workflows/generate_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Generate CSV and README

on:
push:
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.7ss' # Specify the Python version you need

- name: Install dependencies
run: |
cd src
python -m pip install --upgrade pip
pip install -r requirements.txt # Adjust if necessary
- name: Run script to generate CSV and README
run: |
cd src
python generate_files.py # Replace with the name of your Python script
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add src/ser-datasets.csv src/README.md # Replace with your actual CSV file name
git commit -m 'Automatically generated CSV and README from JSON update'
git push origin HEAD:main # Adjust if your default branch is not 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6d34f22

Please sign in to comment.