dotfiles/nix-conf/system/nixos-wsl/.github/workflows/update-flakes.yml

51 lines
1.5 KiB
YAML
Raw Normal View History

2022-08-30 14:29:44 +00:00
name: 'Update flakes'
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 0'
jobs:
update-flakes:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- name: Install nix
uses: cachix/install-nix-action@v12
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
# Configure Nix to enable flakes
extra_nix_config: |
experimental-features = nix-command flakes
- name: Update flakes
run: nix flake update --recreate-lock-file
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update flakes
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: flake-updates
delete-branch: true
title: 'Update flakes'
body: |
Update report
- Updated with *today's* date
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"