.github/workflows/update.yaml #494
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" # every day at 1am UTC(!) | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: | | |
accept-flake-config = true | |
- uses: DeterminateSystems/update-flake-lock@v24 | |
id: update | |
with: | |
commit-msg: "chore(deps): update flake.lock" | |
pr-title: "chore(deps): update flake.lock" | |
token: ${{ secrets.GH_TOKEN }} | |
- name: automerge | |
run: gh pr merge --auto --rebase ${{ steps.update.outputs.pull-request-number }} | |
if: steps.update.outputs.pull-request-number != '' | |
env: | |
# if using a personal access token, workflows are run twice | |
# first in the pr and then after merging | |
GITHUB_TOKEN: ${{ github.token }} |