Update flake.lock on autoupdate-master
Branch
#33887
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: Update flake.lock on `autoupdate-master` Branch | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '*/15 * * * *' | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: cachix/install-nix-action@v27 | |
- name: Config | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Update | |
run: | | |
git checkout $(git rev-parse master) | |
nix flake update --override-input nixpkgs github:NixOS/nixpkgs/master | |
git commit -m "Update flake.lock" -i flake.lock | |
HEAD=$(git rev-parse HEAD) | |
git checkout -B autoupdate-master | |
git reset --hard ${HEAD} | |
- name: Push | |
run: | | |
git push origin autoupdate-master -f |