Add auto-update workflow

This commit is contained in:
2025-10-11 15:59:56 +02:00
parent 046295421d
commit 1c0b8f840c

View File

@@ -0,0 +1,39 @@
# 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" &&
export XDG_CONFIG_HOME="$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" &&
export XDG_CONFIG_HOME="$PWD" &&
tea pr create --head "update-lockfile" --base "main" --title "Update flake.lock"