Update lockfiles #273
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
# SPDX-FileCopyrightText: 2023 Sefa Eyeoglu <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
name: Update lockfiles | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
update-locks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Set Git user info | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Update flake inputs | |
run: | | |
nix flake update --commit-lock-file | |
- name: Update upstream sources | |
run: | | |
# HACK: nvfetcher doesn't delete old extracted files | |
# See https://github.com/berberman/nvfetcher/issues/111 | |
rm -rfv _sources/*/ | |
nix develop -c nvfetcher --commit-changes | |
- name: Create PR | |
id: cpr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
base: "main" | |
branch: "update-locks" | |
delete-branch: true | |
title: "chore: update locks" | |
body: "Automated pull request to update flake.lock and nvfetcher sources" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: merge |