Skip to content

Commit

Permalink
Auto update ZTK versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Jan 23, 2024
1 parent fe7e939 commit 04a2470
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
pull-request-branch-name:
separator: "-"
labels:
- github_actions
- package-ecosystem: pip
directory: dependabot/
schedule:
interval: weekly
open-pull-requests-limit: 10
pull-request-branch-name:
separator: "-"
labels:
- dependencies
36 changes: 36 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Sync Requirements

on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sync:
strategy:
matrix:
python-version: [3.11]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.COMMIT_ACTIONS_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install vereqsyn
- name: Syncing ztk-versions.cfg with requirements.txt
run: |
vereqsyn ztk-versions.cfg dependabot/requirements.txt
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
committer_name: GitHub Actions
committer_email: actions@github.com
message: Version synchronization
add: '["ztk-versions.cfg", "dependabot/requirements.txt"]'
Empty file added dependabot/requirements.txt
Empty file.
12 changes: 12 additions & 0 deletions docs/process/updating-ztk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Updating the ZTK itself
Updating versions of dependencies
---------------------------------

Manual way
++++++++++

To get new version pins into ZTK run the following steps:

* ``tox -e checkversions | grep "="``
Expand All @@ -16,6 +19,15 @@ To get new version pins into ZTK run the following steps:
versions are updated.
* If the test runs are successful: create a pull request on GitHub.

Automated way
+++++++++++++

* There is a dependabot configuration automatically updating
``dependabot/requirements.txt``.

* And there is a GitHub actions job syncing between
``dependabot/requirements.txt`` and ``ztk-versions.cfg``.

Creating a release
------------------

Expand Down

0 comments on commit 04a2470

Please sign in to comment.