Files
my-nixpkgs/.gitea/workflows/auto-update.yaml

43 lines
1.0 KiB
YAML

# Based on https://github.com/infinilabs/gitea-pr/blob/main/action.yml
name: Auto update flake.lock
inputs:
token:
description: Personal access token to the Gitea instance
required: true
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: ${{ inputs.token }}
run: >-
cd "${{ env.GITHUB_WORKSPACE }}" &&
echo "$PWD" &&
tea login add
-u "$GIT_SERVER_URL"
-t "$GIT_SERVER_TOKEN"
- name: Update flake.lock
run: flake update
- name: Create PR
shell: bash
run: >-
cd "${{ env.GITHUB_WORKSPACE }}" &&
echo "$PWD" &&
tea pr create --head "${{ inputs.branch }}" --base "${{ inputs.base }}" --title "Update flake.lock"