-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 2.22 KB
/
ci-home.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI - Home
on:
push:
branches: [main]
paths:
- '.github/workflows/ci-home.yml'
- '**/home-manager/**.nix'
- 'Makefile.toml'
pull_request:
paths:
- '.github/workflows/ci-home.yml'
- '**/home-manager/**.nix'
- 'Makefile.toml'
schedule:
# Every 10:42 JST
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '42 1 * * *'
workflow_dispatch:
jobs:
home-manager:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-13
home-manager-channel-ref:
- a8f8f48320c64bd4e3a266a850bbfde2c6fe3a04 # Pinned for current use
- master # unstable nixpkgs
runs-on: ${{ matrix.os }}
steps:
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Register Nix Channels
run: |
nix-channel --add https://releases.nixos.org/nixpkgs/nixpkgs-23.11pre511546.844ffa82bbe2/nixexprs.tar.xz nixpkgs
nix-channel --add https://github.com/nix-community/home-manager/archive/${{ matrix.home-manager-channel-ref }}.tar.gz home-manager
nix-channel --update
nix-channel --list
- name: Print nixpkgs version after updating channels
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- run: nix-shell '<home-manager>' -A install
- uses: actions/checkout@v3
- run: home-manager switch -b backup -f ./home-manager/user-github-actions.nix
- name: Print some paths and versions
run: |
which fish
which zsh
which bash
which ruby
which irb
which ssh
# Do not use interactive mode here.
# Solutions as https://github.com/actions/runner/issues/241#issuecomment-924327172 will not fit with several problems
- name: Run customized dependencies
run: |
fish --command 'starship --version'
zsh -c 'which dprint'
zsh -c 'ruby --version'
zsh -c 'irb --version'
zsh -c 'alacritty --version'
zsh -c 'ssh -V'
- name: Run homemade commands
run: zsh -c 'la'