nyx/.github/workflows/flake-update.yml

28 lines
786 B
YAML
Raw Normal View History

2024-12-30 00:03:22 +00:00
name: "Update Flake Packages ❄️"
on:
workflow_dispatch:
schedule:
- cron: "5 0 * * *"
jobs:
updateFlakePackages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
2024-12-30 00:07:44 +00:00
uses: actions/checkout@v4
2024-12-30 00:03:22 +00:00
- name: Install Nix
2024-12-30 00:07:44 +00:00
uses: cachix/install-nix-action@v30
2024-12-30 00:03:22 +00:00
- name: Update flake packages
2024-12-30 00:22:23 +00:00
run: nix flake update
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
if [[ $(git status --porcelain) ]]; then
git add flake.lock
git commit -m "Chore: update flake.lock"
git push
else
echo "No changes to commit"
fi