-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from Iovesophy/add-lima
ADD: lima install task
- Loading branch information
Showing
12 changed files
with
67 additions
and
40 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
name: CI to MacOS | ||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Run | ||
run: make | ||
|
||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Run | ||
run: make |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
gather_facts: no | ||
roles: | ||
- homebrew | ||
- dmg | ||
- vim | ||
- lima | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
- name: docker | ||
local_action: stat path=/Applications/Docker.app | ||
register: docker | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
- name: install | ||
shell: | | ||
shell: | | ||
curl -O "{{ item.url }}" | ||
hdiutil attach ./{{ item.name }}.dmg -nobrowse -mountpoint ./{{ item.name }} | ||
cp -aR ./{{ item.name }}/*.app /Applications/{{ item.name }}.app | ||
hdiutil detach ./{{ item.name }}/ | ||
rm -R ./{{ item.name }}.dmg | ||
with_items: "{{ dmg }}" | ||
when: | ||
when: | ||
- docker.stat.exists == False | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
- block: | ||
- include_tasks: check.yml | ||
- include_tasks: install.yml | ||
- include_tasks: check.yml | ||
- include_tasks: install.yml | ||
tags: | ||
- dmg | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
--- | ||
- block: | ||
- name: homebrew update/upgrade | ||
homebrew: | ||
update_homebrew: true | ||
upgrade_all: yes | ||
- name: homebrew install | ||
homebrew: | ||
name: "{{ item.name }}" | ||
with_items: "{{ pkg }}" | ||
- name: homebrew update/upgrade | ||
homebrew: | ||
update_homebrew: true | ||
upgrade_all: yes | ||
- name: homebrew install | ||
homebrew: | ||
name: "{{ item.name }}" | ||
with_items: "{{ pkg }}" | ||
tags: | ||
- homebrew | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ pkg: | |
- name: vint | ||
- name: zsh-git-prompt | ||
- name: neovim | ||
- name: lima | ||
- name: docker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
- block: | ||
- name: checklima | ||
local_action: stat path=~/.lima/docker/docker.yaml | ||
register: limadocker | ||
- name: checkdocker | ||
local_action: stat path=~/.docker/cli-plugins/docker-compose | ||
register: dockercompose | ||
|
||
- name: limadocker | ||
shell: | | ||
cd ~/.lima/docker | ||
curl -O https://raw.githubusercontent.com/lima-vm/lima/master/examples/docker.yaml | ||
limactl start ./docker.yaml | ||
when: | ||
- limadocker.stat.exists == False | ||
|
||
- name: compose | ||
shell: | | ||
mkdir -p ~/.docker/cli-plugins/ | ||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} | ||
mkdir -p $DOCKER_CONFIG/cli-plugins | ||
curl -SL https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-darwin-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose | ||
chmod +x ~/.docker/cli-plugins/docker-compose | ||
when: | ||
- dockercompose.stat.exists == False |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- block: | ||
- include_tasks: lima.yml | ||
tags: | ||
- lima |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
- block: | ||
- include_tasks: vim-plug.yml | ||
- include_tasks: vim-plug.yml | ||
tags: | ||
- vim | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
- block: | ||
- name: check | ||
local_action: stat path=~/.vim/autoload/plug.vim | ||
register: vimplug | ||
- name: vim-plug | ||
shell: | | ||
mkdir -p ~/.vim/autoload | ||
cd ~/.vim/autoload | ||
curl -O https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | ||
when: | ||
- vimplug.stat.exists == False | ||
|
||
- name: check | ||
local_action: stat path=~/.vim/autoload/plug.vim | ||
register: vimplug | ||
- name: vim-plug | ||
shell: | | ||
mkdir -p ~/.vim/autoload | ||
cd ~/.vim/autoload | ||
curl -O https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | ||
when: | ||
- vimplug.stat.exists == False |
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