From d6ed5ef580698b9f207e32813b476fc59942aaf8 Mon Sep 17 00:00:00 2001 From: shivaraj-bh Date: Tue, 28 May 2024 13:46:21 +0530 Subject: [PATCH] ci: auto-merge flake updates to example/simple Notes on how the Github App was created and configured: https://nixos.zulipchat.com/#narrow/stream/413950-nix/topic/.60flake.2Elock.60.20auto-merge.20on.20GitHub/near/440987146 --- .../update-flake-lock-ex-simple.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-flake-lock-ex-simple.yaml b/.github/workflows/update-flake-lock-ex-simple.yaml index c3fa047..c767121 100644 --- a/.github/workflows/update-flake-lock-ex-simple.yaml +++ b/.github/workflows/update-flake-lock-ex-simple.yaml @@ -8,16 +8,33 @@ jobs: example-lock: runs-on: ubuntu-latest steps: + - name: Generate Github App Token + uses: navikt/github-app-token-generator@v1 + id: github-app-token + with: + app-id: ${{ vars.NIXOS_ASIA_APP_ID }} + private-key: ${{ secrets.NIXOS_ASIA_PRIVATE_KEY }} - name: Checkout repository uses: actions/checkout@v4 - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - name: Update flake.lock uses: DeterminateSystems/update-flake-lock@main + id: update-flake-lock with: commit-msg: "chore(example): Update simple/flake.lock" pr-title: "Update example/simple/flake.lock" + pr-body: | + Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action. + + ``` + {{ env.GIT_COMMIT_MESSAGE }} + ``` pr-labels: | automated path-to-flake-dir: 'example/simple' - branch: "update_flake_lock_ex_simple" \ No newline at end of file + branch: "update_flake_lock_ex_simple" + token: ${{ steps.github-app-token.outputs.token }} + - run: "gh pr merge --auto --rebase ${{ steps.update-flake-lock.outputs.pull-request-number }}" + env: + GH_TOKEN: ${{ github.token }