From 8032975bc157f07371d2f922c97fd416ee23e9b7 Mon Sep 17 00:00:00 2001 From: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:07:41 +0100 Subject: [PATCH] Add cron job to auto-update pixi lock file (#978) This way there will be a PR that updates the lock file every month --- .github/workflows/core_tests.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/pixi_auto_update.yml | 32 ++++++++++++++++++++++++++ .github/workflows/pre-commit_check.yml | 2 +- .github/workflows/python_lint.yml | 2 +- .github/workflows/python_tests.yml | 2 +- .github/workflows/qgis.yml | 2 +- 7 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/pixi_auto_update.yml diff --git a/.github/workflows/core_tests.yml b/.github/workflows/core_tests.yml index a5020269f..50015322d 100644 --- a/.github/workflows/core_tests.yml +++ b/.github/workflows/core_tests.yml @@ -1,7 +1,7 @@ name: Julia Tests on: push: - branches: [main] + branches: [main, update/pixi-lock] paths-ignore: [".teamcity/**"] tags: ["*"] pull_request: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ef6eea4c1..4497abdda 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,7 +1,7 @@ name: Docs on: push: - branches: [main] + branches: [main, update/pixi-lock] paths-ignore: [".teamcity/**"] pull_request: merge_group: diff --git a/.github/workflows/pixi_auto_update.yml b/.github/workflows/pixi_auto_update.yml new file mode 100644 index 000000000..96e7c513a --- /dev/null +++ b/.github/workflows/pixi_auto_update.yml @@ -0,0 +1,32 @@ +name: Pixi auto update + +on: + schedule: + # At 03:00 on day 1 of the month + - cron: "0 3 1 * *" + # on demand + workflow_dispatch: + +jobs: + auto-update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + - uses: prefix-dev/setup-pixi@v0.4.3 + with: + pixi-version: "latest" + cache: false + - name: Update pixi lock file + run: | + rm pixi.lock + pixi install + - uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: update/pixi-lock + title: Update pixi lock file + commit-message: "Update `pixi.lock`" + body: Update pixi dependencies to the latest version. + author: "GitHub " diff --git a/.github/workflows/pre-commit_check.yml b/.github/workflows/pre-commit_check.yml index 17d1ae7a2..fb5f88949 100644 --- a/.github/workflows/pre-commit_check.yml +++ b/.github/workflows/pre-commit_check.yml @@ -4,7 +4,7 @@ on: pull_request: merge_group: push: - branches: [main, update/pre-commit-hooks] + branches: [main, update/pre-commit-hooks, update/pixi-lock] jobs: check: diff --git a/.github/workflows/python_lint.yml b/.github/workflows/python_lint.yml index 47310710d..a5a08c9a5 100644 --- a/.github/workflows/python_lint.yml +++ b/.github/workflows/python_lint.yml @@ -1,7 +1,7 @@ name: Python Lint on: push: - branches: [main] + branches: [main, update/pixi-lock] paths-ignore: [".teamcity/**"] tags: ["*"] pull_request: diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 07022ddde..6089785e8 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -1,7 +1,7 @@ name: Ribasim Python Tests on: push: - branches: [main] + branches: [main, update/pixi-lock] paths-ignore: [".teamcity/**"] tags: ["*"] pull_request: diff --git a/.github/workflows/qgis.yml b/.github/workflows/qgis.yml index 67f159a35..608820001 100644 --- a/.github/workflows/qgis.yml +++ b/.github/workflows/qgis.yml @@ -2,7 +2,7 @@ name: QGIS Tests on: push: - branches: [main] + branches: [main, update/pixi-lock] paths-ignore: [".teamcity/**"] tags: ["*"] pull_request: