Skip to content

Commit

Permalink
shellcheck and add CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaijin66 committed May 2, 2024
1 parent 04c16a6 commit 16d2ac3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 9 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Linting and auditing

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master

detect-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: trufflehog-actions-scan
uses: edplato/trufflehog-actions-scan@master
with:
scanArguments: '--regex --entropy=False --max_depth=5 --rules /regexes.json' # Add custom options here*

- name: detect secrets
uses: edplato/[email protected]
18 changes: 9 additions & 9 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Set up the configuration directory
export CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
export CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME"/.config}
if [[ ! -d "$CONFIG_HOME" ]]; then
mkdir -p "$CONFIG_HOME"
fi
Expand Down Expand Up @@ -121,14 +121,14 @@ function setup_dotfiles {
if [ ! -d "$HOME/.oh-my-zsh" ]; then
KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
ln -sf $DOTFILES/zsh/zshrc $HOME/.zshrc
ln -sf "$DOTFILES"/zsh/zshrc "$HOME"/.zshrc

# Yabai
ln -sf $DOTFILES/yabai/yabairc $HOME/.yabairc
ln -sf "$DOTFILES"/yabai/yabairc "$HOME"/.yabairc
chmod +x ~/.yabairc

# skhd
ln -sf $DOTFILES/skhd/skhdrc $HOME/.skhdrc
ln -sf "$DOTFILES"/skhd/skhdrc "$HOME"/.skhdrc
chmod +x ~/.skhdrc
}

Expand All @@ -141,15 +141,15 @@ function setup_directories {
# Function to set up configuration files
function setup_config_files {
# Neovim
rm -rf $HOME/.config/nvim
ln -s $DOTFILES/nvim $HOME/.config/nvim
rm -rf "$HOME"/.config/nvim
ln -s "$DOTFILES"/nvim "$HOME"/.config/nvim

# Kitty
rm -rf $HOME/.config/kitty
ln -s $DOTFILES/kitty $HOME/.config/kitty
rm -rf "$HOME"/.config/kitty
ln -s "$DOTFILES"/kitty "$HOME"/.config/kitty

# Git
ln -sf $DOTFILES/git/gitconfig $HOME/.gitconfig
ln -sf "$DOTFILES"/git/gitconfig "$HOME"/.gitconfig
}

# Run the installation functions
Expand Down

0 comments on commit 16d2ac3

Please sign in to comment.