provisioning #232
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: | |
schedule: | |
# Every Monday, at 10:00 JST | |
- cron: "0 1 * * 1" | |
jobs: | |
macos: | |
runs-on: macos-12 # https://github.com/actions/virtual-environments | |
env: | |
HOMEBREW_VERBOSE: 1 | |
DOTFILES_NOEDIT_SECRETS: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- tags: base,install.homebrew.formula | |
- tags: base,lang | |
- tags: install,app,system | |
skip_tags: install.homebrew.formula | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Link to home | |
run: ln -sf "$PWD" "$HOME/dotfiles" | |
# Refer to https://github.com/actions/runner-images/tree/main/images/macos/provision | |
- name: Uninstall homebrew | |
run: | | |
set -euxo pipefail | |
brew list --cask | xargs brew uninstall --force | |
brew list | xargs brew uninstall --force --ignore-dependencies | |
NONINTERACTIVE=1 HAVE_SUDO_ACCESS=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" | |
rm -rf /usr/local/bin/* | |
- 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 }} |