Compare commits
39 Commits
0332eed068
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f3354a735 | |||
| 22c2cf5237 | |||
| 3203dcdf17 | |||
| 810a1d81fd | |||
| 708758f164 | |||
| d6e8d0dbe4 | |||
| a8d4b08076 | |||
| 213da6e5fd | |||
| b3a3bd05f1 | |||
| bc6b8550d5 | |||
| a782c31f8c | |||
| cd9c738099 | |||
| 350e55b6bb | |||
| 09d60d8e95 | |||
| 0f094261d8 | |||
| 5e626d7216 | |||
| 19ddac120f | |||
| 24ce2a8a06 | |||
| be3de9eb99 | |||
| 0211534667 | |||
| c705d5eeab | |||
| 2c7cb9bdc2 | |||
| b941f8395d | |||
| 97faa87f04 | |||
| 414a61af49 | |||
| 4c5460227d | |||
| ef79450afb | |||
| 8ca603f29b | |||
| f4cf9078b0 | |||
| 1df25d4a75 | |||
| 3649f578fd | |||
| b595b74079 | |||
| ef55b6e2b1 | |||
| cb54ed96fb | |||
| a171f1afc0 | |||
| 74ccb778d4 | |||
| b5be654bf4 | |||
| ced8bd9c6e | |||
|
103704dc20
|
78
.gitea/workflows/auto-update.yaml
Normal file
78
.gitea/workflows/auto-update.yaml
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# 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: Set git bot info
|
||||||
|
shell: nu {0}
|
||||||
|
run: |
|
||||||
|
git config user.email "noreply@notadev.net"
|
||||||
|
git config user.name "Update bot"
|
||||||
|
|
||||||
|
- name: Login to Gitea
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SERVER_URL: tea.notadev.net
|
||||||
|
SERVER_TOKEN: ${{ secrets.token }}
|
||||||
|
SERVER_USER: ${{ secrets.user }}
|
||||||
|
SERVER_PASSWORD: ${{ secrets.password }}
|
||||||
|
run: >-
|
||||||
|
cd "${{ env.GITHUB_WORKSPACE }}" &&
|
||||||
|
echo "$PWD" &&
|
||||||
|
export GITEA_SERVER_URL="$SERVER_URL" &&
|
||||||
|
export GITEA_SERVER_TOKEN="$SERVER_TOKEN" &&
|
||||||
|
export GITEA_SERVER_USER="$SERVER_USER" &&
|
||||||
|
export GITEA_SERVER_PASSWORD="$SERVER_PASSWORD" &&
|
||||||
|
export XDG_CONFIG_HOME="$PWD" &&
|
||||||
|
tea login add --scopes "write:activitypub, write:notification, write:issue, write:misc, write:organization, write:package, write:repository, write:user"
|
||||||
|
|
||||||
|
- name: Update flake.lock
|
||||||
|
run: nix flake update
|
||||||
|
|
||||||
|
- name: Create new commit
|
||||||
|
run: |
|
||||||
|
git checkout -b update-lockfile
|
||||||
|
git add flake.lock
|
||||||
|
git commit -m "Update flake.lock"
|
||||||
|
git push origin update-lockfile
|
||||||
|
|
||||||
|
- name: Create PR
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd "${{ env.GITHUB_WORKSPACE }}"
|
||||||
|
echo "$PWD"
|
||||||
|
export XDG_CONFIG_HOME="$PWD"
|
||||||
|
tea pr create --title "Update flake.lock"
|
||||||
|
|
||||||
|
- name: Merge PR
|
||||||
|
shell: nu {0}
|
||||||
|
run: |
|
||||||
|
cd "${{ env.GITHUB_WORKSPACE }}"
|
||||||
|
echo $env.PWD
|
||||||
|
$env.XDG_CONFIG_HOME = $env.PWD
|
||||||
|
let $index = tea pr list --fields "index,head" --output csv
|
||||||
|
| from csv
|
||||||
|
| where head =~ update-lockfile
|
||||||
|
| get index
|
||||||
|
| $in.0
|
||||||
|
tea pr merge $index --style merge
|
||||||
|
|
||||||
|
- name: Delete branch
|
||||||
|
shell: nu {0}
|
||||||
|
run: |
|
||||||
|
cd "${{ env.GITHUB_WORKSPACE }}"
|
||||||
|
echo $env.PWD
|
||||||
|
git checkout main
|
||||||
|
git branch -D update-lockfile
|
||||||
|
git push origin :update-lockfile
|
||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755684980,
|
"lastModified": 1770508249,
|
||||||
"narHash": "sha256-PdWvn30jHwPCGfcTV2Uu22yo4hpGsoWMDHjpAjVeqx4=",
|
"narHash": "sha256-3ahhMTAMoK9KLjmmWAfdC9nVQgGoMACkCsJ99VyAOA8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "263c40ffdf668f4e7d7d3fc4d3318af7fee1d6f9",
|
"rev": "a5cf8d3e5e416aadc5eea9b019823e9b61673abc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -36,11 +36,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755615617,
|
"lastModified": 1770197578,
|
||||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
Reference in New Issue
Block a user