add auto-merge github action

also use app token for update-flake-lock so that auto-merge actions can be triggered
This commit is contained in:
Jörg Thalheim 2025-05-09 12:58:23 +02:00
parent 63bbe933d0
commit 38d1fdd077
2 changed files with 21 additions and 1 deletions

14
.github/workflows/auto-merge.yaml vendored Normal file
View file

@ -0,0 +1,14 @@
name: Auto Merge Dependency Updates
on:
- pull_request_target
jobs:
auto-merge-dependency-updates:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: "auto-merge:${{ github.head_ref }}"
cancel-in-progress: true
steps:
- uses: Mic92/auto-merge@main

View file

@ -16,13 +16,19 @@ jobs:
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v24
with:
token: ${{ steps.app-token.outputs.token }}
pr-body: |
Automated changes by the update-flake-lock
```
{{ env.GIT_COMMIT_MESSAGE }}
```
pr-labels: | # Labels to be set on the PR
merge-queue
auto-merge