Allow lockfile updates in CI

This commit is contained in:
Gabriel Arazas 2024-11-19 11:15:18 +08:00
parent 814a6c003a
commit 6d144bd701
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 34 additions and 0 deletions

30
.github/workflows/update-deps.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Update Nix dependencies
on:
workflow_dispatch:
schedule:
# This is done on a biweekly basis.
- cron: '0 0 1,15 * *'
jobs:
update-nix-deps:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v16
- run: nix develop --command make update
- id: datetime
run: |
echo "DATETIME=$(date '+%F')" >> "$GITHUB_OUTPUT"
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
title: "ci: update lockfile as of ${{ steps.datetime.outputs.DATETIME }}"
delete-branch: true
branch: update-flake-lockfile
body: ""
commit-message: |
Update flake lockfile as of ${{ steps.datetime.outputs.DATETIME }}
labels: flake-update

View File

@ -9,3 +9,7 @@ update:
.PHONY : build-demo .PHONY : build-demo
build-demo: build-demo:
hugo -s ./exampleSite hugo -s ./exampleSite
.PHONY : dev-update
dev-update:
nix flake update