Update Nix Flake lockfile #155
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 Nix Flake lockfile | |
on: | |
# Enable option to manually run the action: | |
workflow_dispatch: | |
# Run every Sunday: | |
schedule: | |
- cron: 0 0 * * 0 | |
jobs: | |
main: | |
if: github.repository == 'PetarKirov/dotfiles' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v26 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run `nix flake update` | |
id: update-lockfile | |
run: ./utils/commit_flake_update.bash | |
- uses: tibdex/[email protected] | |
id: generate-token | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
title: 'Update Nix Flake lockfile' | |
branch: 'create-pull-request/update-flake-lockfile' | |
delete-branch: true | |
branch-suffix: timestamp | |
add-paths: flake.lock |