Skip to content

Snippet install

Snippet install #148

Workflow file for this run

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