diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 282f12a..1906476 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 - name: Install chezmoi run: | - GIT_USER_NAME="CI Test User" GIT_USER_EMAIL="ci@example.com" ./install.sh + GIT_USER_NAME="CI Test User" GIT_USER_EMAIL="ci@example.com" AWS_PROFILE="" ./install.sh - name: Install config validation tools run: | sudo apt-get update @@ -50,6 +50,9 @@ jobs: - name: Install test dependencies run: | ./bin/setup + - name: Install package dependencies + run: | + bun install - name: Run test suite run: | ./bin/test diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..4caddc9 --- /dev/null +++ b/.npmrc @@ -0,0 +1,15 @@ +# npm configuration for dotfiles repository +# This repository uses bun for package management - npm should not be used directly + +# Prevent npm from trying to write to global directories +# This is especially important in CI environments without root access +global=false + +# Use local prefix to avoid permission issues +prefix=${HOME}/.local/npm-global + +# Disable automatic installation of global packages +install-links=false + +# Disable update notifier in CI +update-notifier=false diff --git a/install.sh b/install.sh index 00cc6a6..f58cc3b 100755 --- a/install.sh +++ b/install.sh @@ -24,6 +24,9 @@ # VERIFY_SIGNATURES: Disable signature verification (default: true) # SKIP_PACKAGE_MANAGER: Force binary download (default: false) # DEBUG: Enable debug output +# GIT_USER_NAME: Git user name (bypasses prompt if set) +# GIT_USER_EMAIL: Git user email (bypasses prompt if set) +# AWS_PROFILE: AWS profile name (bypasses prompt if set, empty string for none) # # EXAMPLE USAGE: # $ git clone https://github.com/ivy/dotfiles.git @@ -116,6 +119,9 @@ ENVIRONMENT VARIABLES: VERIFY_SIGNATURES Disable signature verification (default: true) SKIP_PACKAGE_MANAGER Force binary download (default: false) DEBUG Enable debug output + GIT_USER_NAME Git user name (bypasses prompt if set) + GIT_USER_EMAIL Git user email (bypasses prompt if set) + AWS_PROFILE AWS profile name (bypasses prompt if set, use empty string for none) EXAMPLES: ./install.sh # Install normally @@ -691,6 +697,10 @@ main() { if [ -n "${GIT_USER_EMAIL:-}" ]; then set -- "$@" --promptString "Git user.email=$GIT_USER_EMAIL" fi + # Handle AWS_PROFILE - can be set to empty string to bypass prompt in CI + if [ -n "${AWS_PROFILE+x}" ]; then + set -- "$@" --promptString "aws_profile=$AWS_PROFILE" + fi # Add any additional passthrough arguments if [ -n "$CHEZMOI_ARGS" ]; then