Skip to content

update-flake-lock

update-flake-lock #21

name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
jobs:
update-flake-lock:
strategy:
matrix:
lock-file-dir: [ "test", "example/simple", "example/share-services/pgweb", "example/share-services/northwind" , "example/llm" ]
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(${{ matrix.lock-file-dir }}): Update flake.lock"
pr-title: "Update ${{ matrix.lock-file-dir }}/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: '${{ matrix.lock-file-dir }}'
branch: "update_flake_lock_${{ matrix.lock-file-dir }}"
token: ${{ steps.github-app-token.outputs.token }}
- run: "gh pr merge --auto --rebase --delete-branch ${{ steps.update-flake-lock.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ github.token }}