auto update nixpkgs #205
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: auto update nixpkgs | |
on: | |
schedule: | |
- cron: 15 2 * * * | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# permissions: | |
# contents: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
token: ${{ secrets.PAT }} | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: update nixpkgs | |
run: nix flake update nixpkgs | |
- name: push to main branch | |
run: | | |
git config --global user.name "Alper Çelik (GitHub Actions)" | |
git config --global user.email "[email protected]" | |
git add flake.lock | |
git commit -m "update nixpkgs" || echo "No changes to commit" | |
git push origin main | |