-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (38 loc) · 1.43 KB
/
metdata.yml
File metadata and controls
47 lines (38 loc) · 1.43 KB
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
45
46
47
name: Generate the metadata.csv files
on:
workflow_dispatch:
jobs:
metadata_generation:
runs-on: ubuntu-latest
steps:
# Check out the repository
- name: Checkout repository
uses: actions/checkout@v4
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the version you need, e.g., '3.8'
# Step 3: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Step 4: Run the compute_metadata.py script
- name: Update the metadata files
run: python scripts/compute_metadata.py
# Step 5: Push the metadata files back to the repo
- name: Push the files to the repository
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Assuming the built docs are in the /docs directory
git add '**/metadata.csv'
if git diff --cached --quiet; then
echo "No changes to commit, skipping push."
else
git commit -m "Bot: Auto-Generation of the metadata.csv files"
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub provides this token for auth