This commit is contained in:
2025-07-10 21:27:46 +03:00
parent 2592e7dbd1
commit dd524e1ffb

View File

@@ -9,6 +9,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch: # Добавлено для ручного запуска
env:
BRANCH_NAME: "update-submodules_${{ github.sha }}"
@@ -18,7 +19,7 @@ env:
jobs:
before:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with:
@@ -52,7 +53,7 @@ jobs:
update:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
needs: before
steps:
- uses: actions/checkout@v4
@@ -77,7 +78,7 @@ jobs:
parse:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with:
@@ -98,20 +99,20 @@ jobs:
git fetch origin
git checkout main
git reset --hard origin/main
python3 parse.py
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install scikit-learn tqdm
pip install requests scikit-learn tqdm
python3 parse.py
python3 categories.py
git add modules.json
git commit -m "Updated modules.json after merge $(date +'%Y-%m-%d %H:%M:%S')" || echo "No changes for modules.json"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${REPO_URL}"
git remote set-url origin "https://x-access-token:${GGithub_TOKEN}@${REPO_URL}"
git push origin main
commit:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
needs: update
steps:
- uses: actions/checkout@v4
@@ -134,7 +135,7 @@ jobs:
create_pr:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
needs: commit
steps:
- uses: actions/checkout@v4
@@ -154,7 +155,7 @@ jobs:
backup:
runs-on: ubuntu-latest
needs: parse
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
with: