Merge pull request #571 from nix-community/merge-when-green-joerg

add auto-merge github action
This commit is contained in:
Jörg Thalheim 2025-05-09 11:07:32 +00:00 committed by GitHub
commit 220ef9595d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 uses: cachix/install-nix-action@v31
with: with:
github_access_token: ${{ secrets.GITHUB_TOKEN }} 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 - name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v24 uses: DeterminateSystems/update-flake-lock@v24
with: with:
token: ${{ steps.app-token.outputs.token }}
pr-body: | pr-body: |
Automated changes by the update-flake-lock Automated changes by the update-flake-lock
``` ```
{{ env.GIT_COMMIT_MESSAGE }} {{ env.GIT_COMMIT_MESSAGE }}
``` ```
pr-labels: | # Labels to be set on the PR pr-labels: | # Labels to be set on the PR
merge-queue auto-merge