-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
35 lines (32 loc) · 921 Bytes
/
action.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
name: "Setup dotfiles"
inputs:
install-dotfiles:
description: "whether to install dotfiles"
default: true
required: false
type: boolean
destination-directory:
description: "where the dotfiles should be installed to"
default: "$HOME"
required: false
type: string
runs:
using: "composite"
steps:
- name: Setup nix
uses: contrun/infra@master
with:
setup-cachix: false
setup-qemu: false
free-disk-space: false
- name: Install dependencies
shell: bash
run: |
nix profile install 'nixpkgs#chezmoi' 'nixpkgs#git' 'nixpkgs#gnumake' 'nixpkgs#curl'
- name: Install
if: format('{0}', inputs.install-dotfiles) == 'true'
shell: bash
run: |
mkdir -p "${{ inputs.destination-directory }}"
destdir="$(cd "${{ inputs.destination-directory }}"; pwd)"
make DESTDIR="$destdir" init apply