provisioning #286
This file contains 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: provisioning | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
# Every Monday, at 10:00 JST | |
- cron: "0 1 * * 1" | |
jobs: | |
macos: | |
# cf. https://github.com/actions/runner-images/tree/main/images/macos | |
runs-on: macos-14 | |
env: | |
HOMEBREW_VERBOSE: 1 | |
DOTFILES_NOEDIT_SECRETS: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: fundamental | |
tags: base,install.homebrew.tap,install.homebrew.formula | |
- name: language support | |
tags: base,lang | |
- name: apps and system | |
tags: install,app,system | |
skip_tags: install.homebrew.formula | |
name: ${{ matrix.name }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Link to home | |
run: ln -sf "$PWD" "$HOME/dotfiles" | |
- name: Uninstall homebrew | |
run: | | |
# cf. https://github.com/homebrew/install#uninstall-homebrew | |
NONINTERACTIVE=1 HAVE_SUDO_ACCESS=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" | |
# Remove residual files | |
sudo rm -rf /opt/homebrew/ | |
- name: Install SSH key | |
run: | | |
base64 -D <<< "$ID_RSA_FILE_B64" > ~/.ssh/id_rsa | |
chmod 0600 ~/.ssh/id_rsa | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa | |
env: | |
ID_RSA_FILE_B64: ${{ secrets.ID_RSA_FILE_B64 }} | |
- name: Run | |
run: ./provision -vvvv --tags=${{ matrix.tags }} --skip-tags=${{ matrix.skip_tags }} |