-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (35 loc) · 1.26 KB
/
remote.yaml
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
name: Snippet install
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 5"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-14]
system: [client, server]
exclude:
- os: macos-14
system: server
runs-on: ${{ matrix.os }}
steps:
- name: Setup dotfiles with snippet
env:
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
OS: ${{ matrix.os }}
SYSTEM: ${{ matrix.system }}
run: |
if [ "${OS}" == "macos-14" ]; then
printf '${EMAIL_ADDRESS}\n' | bash -c "$(curl -fsLS https://shunk031.me/dotfiles/setup.sh)"
# │
# └─ Simulate inputting an email address into the chezmoi's config.
elif [ "${OS}" == "ubuntu-latest" ]; then
printf '${EMAIL_ADDRESS}\n${SYSTEM}\n' | bash -c "$(wget -qO - https://shunk031.me/dotfiles/setup.sh)"
# │ │
# │ └─ Simulate inputting an system arcitecture into the config.
# └─ Simulate inputting an email address into the config.
else
echo "${OS} is not supported" >&2
exit 1
fi