Skip to content

update

update #812

Workflow file for this run

name: update
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/create-github-app-token@v2
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_KEY }}
- uses: actions/checkout@v6
- uses: fregante/setup-git-user@v2
- uses: DeterminateSystems/determinate-nix-action@v3
with:
extra-conf: |
accept-flake-config = true
eval-cores = 0
download-buffer-size = 1000000000
log-lines = 200
commit-lock-file-summary = chore(deps): update flake.lock
- name: update flake
run: nix flake update --commit-lock-file
- name: update pkgs
run: nix run '.#pkgs-updater' -- --commit single
env:
GH_TOKEN: ${{ github.token }}
- name: remove unstaged changes
run: git restore .
- uses: peter-evans/create-pull-request@v7
id: pr
with:
token: ${{ steps.generate-token.outputs.token }}
branch: update-deps
delete-branch: true
title: "chore(deps): auto-update"
body: "Automated changes by the update workflow."
- name: automerge
run: gh pr merge --auto --rebase ${{ steps.pr.outputs.pull-request-number }}
if: steps.pr.outputs.pull-request-number != ''
env:
# if using a personal access token, workflows are run twice
# first in the pr and then after merging
GH_TOKEN: ${{ github.token }}