Files
infrastructure/.gitea/workflows/autoupdate.yml
2026-02-19 02:31:46 +01:00

51 lines
1.6 KiB
YAML

name: Weekly Flake Update
on:
schedule:
- cron: "0 0 * * 4"
workflow_dispatch:
permissions:
contents: write
jobs:
update_and_check_flake:
runs-on: ubuntu-latest
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- name: Install sudo
run: |
apt-get update
apt-get install -y sudo
- uses: https://code.forgejo.org/actions/checkout@v6
- name: Set up Nix
uses: https://github.com/cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.AHTLONS_GITHUB_TOKEN }} #Fuck github
- name: Run nix flake update
run: nix flake update
- name: Commit and Push flake.lock
run: |
git config user.name "malobot"
git config user.email "malobot@systemli.org"
git stash push
git branch nixpkgs_bump_$(date +%Y%m%d)
git checkout nixpkgs_bump_$(date +%Y%m%d)
git stash pop
git add flake.lock
git diff --staged --quiet || git commit -m "Update flake.lock"
git push -u origin nixpkgs_bump_$(date +%Y%m%d)
- name: Create Gitea PR
uses: https://github.com/arifer612/Gitea-PR-action@v1
with:
url: https://git.dynamicdiscord.de
token: ${{ secrets.AHTLONS_GITEA_TOKEN }}
tea-version: 0.9.2
pr-label: bump
assignee: ${{ github.actor }}