Skip to content

Commit

Permalink
Merge pull request #9 from nomutin/fix-ci#8
Browse files Browse the repository at this point in the history
[ci] fix ci workflow
  • Loading branch information
nomutin authored Jun 18, 2024
2 parents f343136 + a1ea7fe commit 2cd3ab4
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 126 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/actionlint.yaml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: ci

on:
pull_request:
branches:
- master

jobs:
linting:
name: Lint Shell Scripts and Workflows
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup shfmt
uses: mfinelli/setup-shfmt@v2

- name: Run shfmt
run: |
# shellcheck disable=SC2046
shfmt -i 2 -ci -d $(shfmt -f . | grep -v '\.zsh$')
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master

- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash

- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash

# - uses: JohnnyMorganz/stylua-action@v4
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# version: latest
# args: --check .

- uses: ludvighz/vint-action@v1
with:
path: config/vim/.vimrc
19 changes: 0 additions & 19 deletions .github/workflows/shellcheck.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/shfmt.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ cask "discord"
cask "docker"
cask "font-hack-nerd-font"
cask "iterm2"
cask "microsoft-excel"
cask "microsoft-word"
cask "microsost-powerpoint"
cask "raycast"
cask "visual-studio-code"
cask "zoom"
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
deploy-macos:
bash scripts/deploy-macos.sh

deploy-linux:
bash scripts/deploy-linux.sh
deploy:
bash scripts/deploy.sh

init-macos:
bash scripts/init-macos.sh

.PHONY: deploy-macos deploy-linux init-macos
.PHONY: deploy-macos deploy
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# Nomutin's dotfiles
<div align="center">

![platform](https://img.shields.io/badge/platform-linux%20|%20macos-blue)
[![shellcheck](https://github.com/nomutin/dotfiles/actions/workflows/shellcheck.yaml/badge.svg)](https://github.com/nomutin/dotfiles/actions/workflows/shellcheck.yaml)
[![actionlint](https://github.com/nomutin/dotfiles/actions/workflows/actionlint.yaml/badge.svg)](https://github.com/nomutin/dotfiles/actions/workflows/actionlint.yaml)
[![shfmt](https://github.com/nomutin/dotfiles/actions/workflows/shfmt.yaml/badge.svg)](https://github.com/nomutin/dotfiles/actions/workflows/shfmt.yaml)
# .dotfiles

```shell
bash -c "$(curl https://raw.githubusercontent.com/nomutin/dotfiles/master/scripts/install.sh)"
```

## Other Applications

### MS Office applications
Dotfiles for my own `macOS` and non-root `Linux`.

Only users with access privilege can open from the link.
![platform](https://img.shields.io/badge/platform-macOS%20|%20Linux-blue)
[![Lint](https://github.com/nomutin/dotfiles/actions/workflows/lint.yaml/badge.svg)](https://github.com/nomutin/dotfiles/actions/workflows/lint.yaml)

[google drive](https://drive.google.com/file/d/1soT3UK_pYMM_M9VxWZdm-dVIBGhS8xBi/view?usp=sharing)
</div>

### ssh keys&configs

Only users with access privilege can open from the link.
```shell
bash -c "$(curl https://raw.githubusercontent.com/nomutin/dotfiles/master/scripts/install.sh)"
```

[notion](https://www.notion.so/SSH-config-b7d08f8f06bc40e88325763da68557fb)
## Contents

| App Group | App | Platform | Config |
| --- | --- | --- | :---: |
| Shell | [zsh](https://www.zsh.org) | ![platform](https://img.shields.io/badge/platform-macOS-blue) | [🔍](./config/shell/.zshrc) |
| | [bash](https://www.gnu.org/software/bash/) | ![platform](https://img.shields.io/badge/platform-Linux-blue) | |
| Package Manager | [Homebrew](https://brew.sh) | ![platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue) | [🔍](./Brewfile) |
| | [mise](https://mise.jdx.dev/) | ![platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue) | [🔍](./config/mise/config.toml) |
| Terminal Emulator | [iterm2](https://iterm2.com) | ![platform](https://img.shields.io/badge/platform-macOS-blue) | |
| Terminal Multiplexer | [zellij](https://zellij.dev) | ![platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue) | [🔍](./config/zellij/config.kdl) |
| Text Editor | [neovim](https://neovim.io) | ![platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue) | [🔍](./config/neovim/README.md) |
| | [vim](https://www.vim.org) | ![platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-blue) | [🔍](./config/vim/.vimrc) |
1 change: 1 addition & 0 deletions config/neovim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ require("lazy").setup {
"hadolint", -- dockerfile
"stylua", -- lua
"markdownlint", -- markdown
"shellcheck", -- sh
"shfmt", -- sh
"actionlint", -- yaml
"prettier", -- javascript etc.
Expand Down
6 changes: 0 additions & 6 deletions config/shell/.profile

This file was deleted.

4 changes: 4 additions & 0 deletions config/shell/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ alias ls='ls --color=auto'
export MANPAGER="less -R --use-color -Dd+r -Du+b"
export CLICOLOR=1
export LSCOLORS=GxGxBxDxCxEgEdxbxgxcxd

eval "$(~/.local/bin/mise activate zsh)"
# shellcheck disable=SC1091
source "$HOME/.rye/env"
17 changes: 0 additions & 17 deletions scripts/deploy-linux.sh

This file was deleted.

14 changes: 10 additions & 4 deletions scripts/deploy-macos.sh → scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ ln -sf "${HOME}"/.dotfiles/config/neovim/init.lua "${HOME}"/.config/nvim/init.lu
mkdir -p "${HOME}"/.config/mise
ln -sf "${HOME}"/.dotfiles/config/mise/config.toml "${HOME}"/.config/mise/config.toml

ln -sf "${HOME}"/.dotfiles/config/shell/.profile "${HOME}"/.zprofile
ln -sf "${HOME}"/.dotfiles/config/shell/.zshrc "${HOME}"/.zshrc
if [ "$(uname)" = "Darwin" ]; then
ln -sf "${HOME}"/.dotfiles/config/shell/.zshrc "${HOME}"/.zshrc
# shellcheck disable=SC1090
source ~/.zshrc

# shellcheck disable=SC1090
source ~/.zshrc
elif [ "$(uname)" = "Linux" ]; then
echo "eval '$(~/.local/bin/mise activate bash)'" >>~/.bashrc
echo "source '$HOME/.rye/env'" >>~/.bashrc
# shellcheck disable=SC1090
source ~/.bashrc
fi
8 changes: 2 additions & 6 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ fi

cd .dotfiles

# Deploy dotfiles
if [ "$(uname)" = "Darwin" ]; then
make deploy-macos
else
make deploy-linux
fi
# Deploy
make deploy

mise install -y

Expand Down

0 comments on commit 2cd3ab4

Please sign in to comment.