-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructure workflows and add one for automatic files generation
- Loading branch information
1 parent
2ab4b46
commit 6d34f22
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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
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 }} |