From 4895c180e193264277da0c393cab75b4e39b7513 Mon Sep 17 00:00:00 2001 From: houseme Date: Sun, 15 Feb 2026 09:21:43 +0800 Subject: [PATCH] ci(Flake): optimize nix-flake-update workflow (#1827) Signed-off-by: houseme Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> --- .github/workflows/nix-flake-update.yml | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/nix-flake-update.yml diff --git a/.github/workflows/nix-flake-update.yml b/.github/workflows/nix-flake-update.yml new file mode 100644 index 000000000..2745f5320 --- /dev/null +++ b/.github/workflows/nix-flake-update.yml @@ -0,0 +1,60 @@ +# Copyright 2024 RustFS Team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Update Nix Flake + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' # Weekly on Sundays + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + update-flake: + name: Update flake.lock + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install Nix + uses: DeterminateSystems/determinate-nix-action@v3 + + - name: Check Nix flake inputs + uses: DeterminateSystems/flake-checker-action@v12 + + - name: Update flake.lock + id: update + uses: DeterminateSystems/update-flake-lock@main + with: + pr-title: "chore(deps): update flake.lock" + pr-labels: | + dependencies + nix + commit-msg: "chore(deps): update flake.lock" + + - name: Log PR details + if: steps.update.outputs.pull-request-number + run: | + echo "Pull Request created: ${{ steps.update.outputs.pull-request-number }}"