Skip to content

Introduce markdownlint #1222

Introduce markdownlint

Introduce markdownlint #1222

Workflow file for this run

name: 🏠
on:
push:
branches: [main]
paths:
- '.github/workflows/ci-home.yml'
- '**/home-manager/**.nix'
- '**.nix'
- 'flake.*'
- 'Makefile.toml'
pull_request:
paths:
- '.github/workflows/ci-home.yml'
- '**/home-manager/**.nix'
- '**.nix'
- 'flake.*'
- '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:
if: (github.event_name != 'pull_request') || (!github.event.pull_request.draft)
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- macos-13 # Intel. Do not use macos-14 to prefer architecture - https://github.com/actions/runner-images/issues/9741#issuecomment-2075259811
runs-on: ${{ matrix.os }}
steps:
# Do not use DeterminateSystems/magic-nix-cache-action for home workflow, it always faced to GitHub rate limit because of home depends on many packages
- uses: DeterminateSystems/nix-installer-action@v12
- name: Print some dotfiles overviews
run: |
cat /etc/nix/nix.conf
ls -alh ~
- uses: actions/checkout@v4
# https://www.reddit.com/r/Nix/comments/1443k3o/comment/jr9ht5g/?utm_source=reddit&utm_medium=web2x&context=3
- run: mkdir -p ~/.local/state/nix/profiles
- run: nix develop --command echo 'This step should be done before any other "nix develop" steps because of measuring Nix build time'
- run: nix run .#home-manager -- switch -b backup --flake '.#github-actions@${{ matrix.os }}'
- name: 'Make sure no possibilities in nix store around #530 (around CVE-2024-3094)'
run: |
which xz
# Can be used when the xz is using /nix/store one
# nix-store --query --referrers "$(which xz)"
nix run .#check_no_dirty_xz_in_nix_store
- name: Print some paths and versions
run: |
which fish
which zsh
which bash
which ruby
which irb
which ssh
- name: Make sure the $PATH for bash is not overridden as like the `path_helper`. See https://github.com/kachick/dotfiles/issues/503
run: |
[[ "$(zsh -c 'which bash')" == "$HOME/.nix-profile/bin/bash" ]]
[[ "$(bash -c 'which bash')" == "$HOME/.nix-profile/bin/bash" ]]
[[ "$(fish -c 'which bash')" == "$HOME/.nix-profile/bin/bash" ]]
# 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 zsh -c 'which la; which p'
zsh -c 'ruby --version'
zsh -c 'irb --version'
zsh -c 'alacritty --version'
zsh -c 'ssh -V'
- name: Run homemade commands
run: |
zsh -c 'la ~; lat ~/.config'
zsh -c "p neo-cowsay hello --command 'cowsay --rainbow \$(hello)'"
- name: Backup generated config
run: |
zsh -c 'archive-home-files home-manager-generation-home-files'
- name: Upload artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: 'home-files-${{ github.sha }}-${{ runner.os }}'
path: home-manager-generation-home-files.tar.gz
if-no-files-found: 'error'