-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
75 lines (67 loc) · 2.25 KB
/
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
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
68
69
70
71
72
73
74
75
name: 'Set up a Doom Emacs environment'
description: 'Install a specific version of Doom Emacs (and Emacs) for use in your workflow.'
author: 'Henrik Lissner'
inputs:
version:
description: 'The version, branch, tag, or SHA of Doom core to install, e.g. "v3.0.0", or "master" for the latest development version.'
type: string
default: "master"
emacs-version:
description: 'The version of Emacs to install, e.g. "28.1", or "snapshot" for a recent development version.'
type: string
default: "28.1"
emacsdir:
description: "TODO"
type: string
default: ".emacs.d"
doomdir:
description: "TODO"
type: string
default: ".github"
sync:
description: "Whether or not to automatically run 'doom sync'"
type: boolean
default: true
sync-options:
description: "Options to pass to 'doom sync'"
type: string
default: "-f cli.el --no-compile"
runs:
using: 'composite'
env:
EMACSDIR: ${{ inputs.emacsdir }}
DOOMDIR: ${{ inputs.doomdir }}
steps:
- uses: purcell/setup-emacs@master
if: runner.os != 'Windows'
with.version: ${{ inputs.emacs-version }}
- uses: actions/setup-python@v2
if: runner.os == 'Windows'
with:
python-version: '3.6'
architecture: 'x64'
- uses: jcs090218/setup-emacs-windows@master
if: runner.os == 'Windows'
with.version: ${{ inputs.emacs-version }}
- name: Checkout Doom Emacs
uses: actions/checkout@v3.0.2
with:
repository: doomemacs/doomemacs
path: ${{ inputs.emacsdir }}
ref: ${{ inputs.version }}
- name: Generate DOOMHASH and add bin/doom to PATH
shell: bash
run: |
# To later identify if this config has changed.
echo "DOOMHASH=$(doom profile hash)" >> $GITHUB_ENV
# Add bin/doom to $PATH with perl because it's more ubiqitous and
# consistent across platforms than 'readlink -f'.
perl -MCwd -le 'print Cwd::abs_path shift' ${{ inputs.emacsdir }}/bin >> $GITHUB_PATH
- name: Cache packages
uses: actions/cache@v3
with:
path: ${{ inputs.emacsdir }}/.local/straight/repos
key: build-${{ env.DOOMHASH }}
- name: doom sync
if: inputs.sync
run: doom ${{ inputs.sync-options }} sync