From a114385c5ce2ab1d21214f23c57fc4efc1924ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emma=20Bast=C3=A5s?= Date: Sat, 11 Oct 2025 15:59:56 +0200 Subject: [PATCH] Add auto-update workflow --- .gitea/workflows/auto-update.yaml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/auto-update.yaml diff --git a/.gitea/workflows/auto-update.yaml b/.gitea/workflows/auto-update.yaml new file mode 100644 index 0000000..888b6db --- /dev/null +++ b/.gitea/workflows/auto-update.yaml @@ -0,0 +1,37 @@ +# Based on https://github.com/infinilabs/gitea-pr/blob/main/action.yml + +name: Auto update flake.lock + +on: + workflow_dispatch: # allows manual triggering + schedule: + - cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 + +jobs: + auto-update: + runs-on: basic-nix + steps: + - name: Check out repo + uses: actions/checkout@v4 + + - name: Login to Gitea + shell: bash + env: + GIT_SERVER_URL: tea.notadev.net + GIT_SERVER_TOKEN: ${{ secrets.token }} + run: >- + cd "${{ env.GITHUB_WORKSPACE }}" && + echo "$PWD" && + tea login add + -u "$GIT_SERVER_URL" + -t "$GIT_SERVER_TOKEN" + + - name: Update flake.lock + run: nix flake update + + - name: Create PR + shell: bash + run: >- + cd "${{ env.GITHUB_WORKSPACE }}" && + echo "$PWD" && + tea pr create --head "main" --base "update-lockfile" --title "Update flake.lock"