ci: update flake use gh app to push

This commit is contained in:
2 * r + 2 * t 2026-03-20 19:10:08 +11:00
parent 4e9907c39a
commit ca28d39ec4

View file

@ -3,17 +3,24 @@ name: Update flake inputs
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: '0 0 * * 0' - cron: "0 0 * * 0"
jobs: jobs:
update-flake: update-flake:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: write
steps: steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
persist-credentials: false
- name: Install Nix - name: Install Nix
uses: nixbuild/nix-quick-install-action@v31 uses: nixbuild/nix-quick-install-action@v31
@ -80,6 +87,7 @@ jobs:
if: steps.check.outputs.modified == 'true' if: steps.check.outputs.modified == 'true'
uses: EndBug/add-and-commit@v9 uses: EndBug/add-and-commit@v9
with: with:
token: ${{ steps.app-token.outputs.token }}
add: flake.lock add: flake.lock
default_author: github_actions default_author: github_actions
message: "[CI] chore: update flake" message: "[CI] chore: update flake"