From dd524e1ffbcc6df4880e74c83ccff112a0431886 Mon Sep 17 00:00:00 2001 From: Macsim Date: Thu, 10 Jul 2025 21:27:46 +0300 Subject: [PATCH] fixes --- .github/workflows/ci.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b68e1ee..26ec4d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: