Convert machine setup to declarative mise bootstrap #74
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: bootstrap | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| permissions: {} # default-deny; no job here needs the GITHUB_TOKEN | |
| jobs: | |
| ubuntu: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # checkout | |
| steps: | |
| # Submodules are left to mise's pre-dotfiles hook so that the hook is | |
| # exercised rather than bypassed. | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install mise | |
| run: | | |
| curl -fsSL https://mise.run | sh | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| - name: Run bootstrap | |
| run: | | |
| set -e | |
| mise trust | |
| # tools: the runtimes in [tools] take far longer than this job is | |
| # worth; task: bootstrap:nvim compiles every treesitter parser. | |
| mise bootstrap -y --force-dotfiles --skip tools,task | |
| # The one task that is cheap and Linux-specific — it creates the | |
| # fd/bat shims the next step asserts on. | |
| mise run bootstrap:linux-shims | |
| # ~/.config/mise/config.toml is a symlink into the repo as of the | |
| # dotfiles step above, so it needs trusting before it can be read. | |
| mise trust ~/.config/mise/config.toml | |
| - name: Verify dotfiles converged | |
| run: mise bootstrap dotfiles status --missing | |
| - name: Verify CLI tools installed | |
| run: | | |
| set -e | |
| for cmd in zsh nvim lsd zoxide fzf tmux rg gh delta; do | |
| command -v "$cmd" >/dev/null || { echo "missing: $cmd"; exit 1; } | |
| done | |
| test -x "$HOME/.local/bin/fd" | |
| test -x "$HOME/.local/bin/bat" | |
| - name: Verify re-running is a no-op | |
| run: | | |
| set -e | |
| before=$(find "$HOME" -maxdepth 3 -type l 2>/dev/null | sort | sha256sum) | |
| mise bootstrap -n --skip tools,task > /dev/null | |
| after=$(find "$HOME" -maxdepth 3 -type l 2>/dev/null | sort | sha256sum) | |
| [ "$before" = "$after" ] || { echo "dry-run modified state"; exit 1; } | |
| shellcheck: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # checkout | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| # .claude/scripts/statusline.sh is not covered yet — it has pre-existing | |
| # warnings that want fixing on their own. | |
| - name: Run shellcheck | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq shellcheck | |
| shellcheck .tmux/*.sh |