refactor: use DetSys flake update action
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
4b15562549
commit
833c45ea56
1 changed files with 5 additions and 20 deletions
25
.github/workflows/update-flake.yml
vendored
25
.github/workflows/update-flake.yml
vendored
|
@ -25,30 +25,15 @@ jobs:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@v13
|
uses: DeterminateSystems/nix-installer-action@v13
|
||||||
|
|
||||||
- name: Set Git user info
|
- name: Update flake.lock
|
||||||
run: |
|
id: update
|
||||||
git config user.name 'github-actions[bot]'
|
uses: DeterminateSystems/update-flake-lock@main
|
||||||
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
|
||||||
|
|
||||||
- name: Update flake inputs
|
|
||||||
run: |
|
|
||||||
nix flake update \
|
|
||||||
--commit-lock-file \
|
|
||||||
--commit-lockfile-summary "nix: update flake.lock"
|
|
||||||
|
|
||||||
- name: Create PR
|
|
||||||
id: cpr
|
|
||||||
uses: peter-evans/create-pull-request@v6
|
|
||||||
with:
|
with:
|
||||||
base: 'main'
|
pr-title: "nix: update flake.lock"
|
||||||
branch: 'update-locks'
|
|
||||||
delete-branch: true
|
|
||||||
title: 'chore(nix): update lockfiles'
|
|
||||||
body: 'Automated pull request to update flake locks'
|
|
||||||
|
|
||||||
- name: Enable Pull Request Automerge
|
- name: Enable Pull Request Automerge
|
||||||
if: steps.cpr.outputs.pull-request-operation == 'created'
|
if: steps.cpr.outputs.pull-request-operation == 'created'
|
||||||
uses: peter-evans/enable-pull-request-automerge@v3
|
uses: peter-evans/enable-pull-request-automerge@v3
|
||||||
with:
|
with:
|
||||||
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
pull-request-number: ${{ steps.update.outputs.pull-request-number }}
|
||||||
merge-method: rebase
|
merge-method: rebase
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue