Skip to content

Commit da98222

Browse files
committed
ci(gh-actions): Rewrite the nix-packages-update workflow
1 parent a2c880a commit da98222

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Nix Packages auto-update ❄️'
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *' # https://crontab.guru/#0_0_*_*_*
6+
7+
jobs:
8+
update-packages:
9+
runs-on: ['self-hosted']
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Nix
15+
uses: metacraft-labs/nixos-modules/.github/install-nix@main
16+
with:
17+
nix-github-token: ${{ secrets.NIX_GITHUB_TOKEN }}
18+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
19+
cachix-cache: ${{ vars.CACHIX_CACHE }}
20+
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }}
21+
substituters: ${{ vars.SUBSTITUTERS }}
22+
23+
- uses: tibdex/[email protected]
24+
id: generate-token
25+
with:
26+
app_id: ${{ secrets.CREATE_PR_APP_ID }}
27+
private_key: ${{ secrets.CREATE_PR_APP_PRIVATE_KEY }}
28+
29+
- name: Update flake packages
30+
uses: metacraft-labs/nix-update-action@main
31+
with:
32+
token: ${{ steps.generate-token.outputs.token }}

.github/workflows/update-flake-packages.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)