Skip to content

Commit 8728e3e

Browse files
committed
ci: add flake workflow and update flakes
1 parent a399bf2 commit 8728e3e

File tree

4 files changed

+585
-42
lines changed

4 files changed

+585
-42
lines changed

.github/workflows/flake.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: flake
3+
4+
"on":
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 8 * * 1"
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
flake:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Generate token
19+
id: token
20+
uses: tibdex/github-app-token@v2
21+
with:
22+
app_id: ${{ secrets.TOKEN_EXCHANGE_APP }}
23+
installation_retrieval_mode: id
24+
installation_retrieval_payload: ${{ secrets.TOKEN_EXCHANGE_INSTALL }}
25+
private_key: ${{ secrets.TOKEN_EXCHANGE_KEY }}
26+
permissions: >-
27+
{"contents": "write", "pull_requests": "write"}
28+
29+
- name: Checkout source
30+
id: source
31+
uses: actions/checkout@v4
32+
33+
- name: Install nix
34+
id: nix
35+
uses: cachix/install-nix-action@v27
36+
37+
- name: Update flake
38+
id: flake
39+
uses: DeterminateSystems/update-flake-lock@v23
40+
with:
41+
commit-msg: "chore(flake): updated lockfile"
42+
pr-title: "chore: automated flake update"
43+
pr-body: "New flakelock generated, automerge should handle that!"
44+
pr-labels: renovate
45+
git-author-name: GitHub Actions
46+
git-author-email: [email protected]
47+
token: ${{ steps.token.outputs.token }}
48+
49+
- name: Enable automerge
50+
id: automerge
51+
if: steps.flake.outputs.pull-request-operation == 'created'
52+
run: gh pr merge --rebase --auto "${{ steps.flake.outputs.pull-request-number }}"
53+
env:
54+
GH_TOKEN: ${{ steps.token.outputs.token }}
55+
56+
...

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.direnv
2+
.devenv
23
coverage.out
34

45
/bin

0 commit comments

Comments
 (0)