From 52baed8ff4b3478b26f94962ee534846c60ac8bf Mon Sep 17 00:00:00 2001 From: Vasilije <8619304+Vasilije1990@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:39:31 -0800 Subject: [PATCH] bug: added fix and added my pat (#597) ## Description ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin ## Summary by CodeRabbit - **Chores** - Introduced an automated process that routinely updates project dependencies. This enhancement minimizes manual maintenance and helps ensure optimal system stability and security for users. --- .github/workflows/autoupdate.yml | 60 +++++++++++++++++++++++++++++ .github/workflows/upgrade_deps.yml | 62 ------------------------------ 2 files changed, 60 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/autoupdate.yml delete mode 100644 .github/workflows/upgrade_deps.yml diff --git a/.github/workflows/autoupdate.yml b/.github/workflows/autoupdate.yml new file mode 100644 index 000000000..54133f3f3 --- /dev/null +++ b/.github/workflows/autoupdate.yml @@ -0,0 +1,60 @@ +name: clean | Auto Update Dependencies + +on: + schedule: + - cron: '0 0 * * 1' # Run every Monday at midnight + workflow_dispatch: # Allow manual triggering + push: + branches: + - main + - dev + paths: + - 'requirements.txt' + - 'pyproject.toml' + - 'poetry.lock' + pull_request: + types: [opened, synchronize, reopened] + branches: + - main + - dev + paths: + - 'requirements.txt' + - 'pyproject.toml' + - 'poetry.lock' + +jobs: + update: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }} # Personal Access Token with repo scope + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pip-tools + + - name: Update dependencies + run: | + pip-compile --upgrade requirements.txt + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }} # Personal Access Token with repo scope + commit-message: "chore: update dependencies" + title: "chore: update dependencies" + body: "Automated dependency updates" + branch: "chore/dependency-updates" + delete-branch: true \ No newline at end of file diff --git a/.github/workflows/upgrade_deps.yml b/.github/workflows/upgrade_deps.yml deleted file mode 100644 index 5262889de..000000000 --- a/.github/workflows/upgrade_deps.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Update Poetry Dependencies - -on: - schedule: - - cron: '0 3 * * 0' # Runs at 3 AM every Sunday - push: - paths: - - 'poetry.lock' - - 'pyproject.toml' - branches: - - main - - dev - pull_request: - paths: - - 'poetry.lock' - - 'pyproject.toml' - types: [opened, synchronize, reopened] - branches: - - main - - dev - workflow_dispatch: - inputs: - debug_enabled: - type: boolean - description: 'Run the update with debug logging' - required: false - default: false - -jobs: - update-dependencies: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - - steps: - - name: Check out - uses: actions/checkout@master - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Install Poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - poetry config virtualenvs.create false - - - name: Update dependencies - run: poetry update - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "chore: Update Poetry dependencies" - title: "chore: Update Poetry dependencies" - body: "Automated Poetry dependency updates" - base: "dev" - branch: "chore/poetry-updates" - delete-branch: true \ No newline at end of file