dots #1745
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: dots | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
# midnight and noon PT | |
- cron: '0 8,20 * * *' | |
concurrency: | |
group: ${{ github.actor }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
setup: | |
name: Setup & install drn/dots | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.19.5' | |
- name: Cache Go Modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install drn/dots | |
run: go install github.com/drn/dots | |
- name: Verify installation | |
run: dots help | |
- name: Cache dots CLI | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/go/bin/dots | |
lint: | |
name: Lint | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.19.5' | |
- name: Install Golint | |
run: go install github.com/mgechev/revive@latest | |
- name: Go Lint | |
run: revive -set_exit_status ./... | |
dots-install-bin: | |
name: dots install bin | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install bin | |
dots-install-git: | |
name: dots install git | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install git | |
dots-install-home: | |
name: dots install home | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install home | |
dots-install-zsh: | |
name: dots install zsh | |
needs: setup | |
runs-on: macos-latest | |
env: | |
DOTS: /Users/runner/work/dots/dots | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install zsh | |
dots-install-fonts: | |
name: dots install fonts | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install fonts | |
dots-install-homebrew: | |
name: dots install homebrew | |
needs: setup | |
runs-on: macos-latest | |
if: github.ref == 'refs/heads/master' | |
env: | |
DOTS: /Users/runner/work/dots/dots | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- name: Handle CI brew installation conflicts | |
run: | | |
rm /usr/local/bin/aws* # awscli | |
rm /usr/local/bin/go* # go, gofmt | |
- run: dots install homebrew | |
dots-install-npm: | |
name: dots install npm | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install npm | |
dots-install-vim: | |
name: dots install vim | |
needs: setup | |
runs-on: macos-latest | |
env: | |
DOTS: /Users/runner/work/dots/dots | |
steps: | |
- name: Prune preinstalled golang | |
run: brew uninstall [email protected] && brew cleanup || true | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.19.5' | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: brew install neovim | |
- run: dots install home # symlinks ~/.vimrc | |
- run: dots install vim || true # suppress CI failures | |
dots-install-languages: | |
name: dots install languages | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: | | |
brew install asdf | |
source $(brew --prefix)/opt/asdf/libexec/asdf.sh | |
dots install languages | |
env: | |
OPENSSL_CFLAGS: -Wno-error=implicit-function-declaration | |
dots-install-hammerspoon: | |
name: dots install hammerspoon | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install hammerspoon | |
dots-install-osx: | |
name: dots install osx | |
needs: setup | |
runs-on: macos-latest | |
steps: | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: dots install osx | |
dots-update: | |
name: dots update | |
needs: setup | |
runs-on: macos-latest | |
env: | |
DOTS: /Users/runner/work/dots/dots | |
steps: | |
- name: Prune preinstalled golang | |
run: brew uninstall [email protected] && brew cleanup || true | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.19.5' | |
- name: Fetch dots CLI | |
uses: actions/download-artifact@v2 | |
with: | |
name: dots-cli | |
path: ~/bin | |
- run: chmod +x ~/bin/dots | |
- run: brew install neovim | |
- run: dots install home # symlinks ~/.vimrc | |
- run: dots update || true # suppress CI failures |