Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
4a1208942d | |||
91780024f0 | |||
3ca4fe0c65 | |||
e6dfff255c | |||
15942bb08d |
@ -48,6 +48,7 @@ There are a few notable changes to this runtime:
|
||||
- User yes/no prompts will **always be YES**
|
||||
- Other user input will default to an empty string
|
||||
- Logs will not be captured
|
||||
- Setting the environment variable `SCWRYPTS_GROUP_LOADER__[a-z_]\+` will source the file indicated in the variable (this allows custom groups without needing to modify the `config.zsh` directly)
|
||||
|
||||
|
||||
## Contributing
|
||||
|
10
action.yaml
10
action.yaml
@ -1,7 +1,7 @@
|
||||
--- # allow running scwrypts in Github Actions
|
||||
name: scwrypts
|
||||
author: yage
|
||||
description: check requird dependencies and run a scwrypt
|
||||
description: check required dependencies and run a scwrypt
|
||||
|
||||
inputs:
|
||||
scwrypt:
|
||||
@ -27,7 +27,7 @@ runs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wrynegade/scwrypts
|
||||
path: ./scwrypts
|
||||
path: ./wrynegade/scwrypts
|
||||
ref: ${{ inputs.version }}
|
||||
|
||||
- name: check dependencies
|
||||
@ -43,7 +43,7 @@ runs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes zsh fzf ripgrep
|
||||
|
||||
for D in $($GITHUB_WORKSPACE/scwrypts/scwrypts -n --name check-all-dependencies --group ci --type zsh)
|
||||
for D in $($GITHUB_WORKSPACE/wrynegade/scwrypts/scwrypts -n --name check-all-dependencies --group ci --type zsh)
|
||||
do
|
||||
echo "--- installing $D ---"
|
||||
( sudo apt-get install --yes $D; exit 0; )
|
||||
@ -51,7 +51,7 @@ runs:
|
||||
} > $HOME/.scwrypts.apt-get.log 2>&1
|
||||
|
||||
echo "updating virtual dependencies"
|
||||
$GITHUB_WORKSPACE/scwrypts/scwrypts -n \
|
||||
$GITHUB_WORKSPACE/wrynegade/scwrypts/scwrypts -n \
|
||||
--name scwrypts/virtualenv/update-all \
|
||||
--group scwrypts \
|
||||
--type zsh \
|
||||
@ -65,4 +65,4 @@ runs:
|
||||
env:
|
||||
CI: true
|
||||
SCWRYPTS_ENV: ${{ inputs.scwrypts-env }}
|
||||
run: $GITHUB_WORKSPACE/scwrypts/scwrypts ${{inputs.scwrypt}} -- ${{inputs.args}}
|
||||
run: $GITHUB_WORKSPACE/wrynegade/scwrypts/scwrypts ${{inputs.scwrypt}} -- ${{inputs.args}} || exit 1
|
||||
|
1
run
1
run
@ -218,6 +218,7 @@ __RUN() {
|
||||
|
||||
[[ $ENV_REQUIRED -eq 1 ]] && {
|
||||
[ ! $ENV_NAME ] && ENV_NAME=$(SCWRYPTS__SELECT_ENV)
|
||||
|
||||
for GROUP in ${SCWRYPTS_GROUPS[@]}
|
||||
do
|
||||
local ENV_FILE=$(SCWRYPTS__GET_ENV_FILE "$ENV_NAME" "$GROUP")
|
||||
|
@ -47,6 +47,13 @@ do
|
||||
}
|
||||
done
|
||||
|
||||
#####################################################################
|
||||
|
||||
for GROUP_LOADER in $(env | sed -n 's/^SCWRYPTS_GROUP_LOADER__[a-z_]\+=//p')
|
||||
do
|
||||
[ -f "$GROUP_LOADER" ] && source "$GROUP_LOADER"
|
||||
done
|
||||
|
||||
#####################################################################
|
||||
[ $NO_EXPORT_CONFIG ] || __SCWRYPT=1 # arbitrary; indicates currently inside a scwrypt
|
||||
true
|
||||
|
@ -54,6 +54,28 @@ _HELM__GET_CHART_ROOT() {
|
||||
}
|
||||
|
||||
_HELM__GET_DEFAULT_VALUES_ARGS() {
|
||||
for LOCAL_REPOSITORY in $(\
|
||||
cat "$CHART_ROOT/Chart.yaml" \
|
||||
| yq -r '.dependencies[] | .repository' \
|
||||
| grep '^file://' \
|
||||
| sed 's|file://||' \
|
||||
)
|
||||
do
|
||||
[[ $LOCAL_REPOSITORY =~ ^[/~] ]] \
|
||||
&& LOCAL_REPOSITORY_ROOT="$LOCAL_REPOSITORY" \
|
||||
|| LOCAL_REPOSITORY_ROOT="$CHART_ROOT/$LOCAL_REPOSITORY" \
|
||||
;
|
||||
|
||||
for F in \
|
||||
"$LOCAL_REPOSITORY_ROOT/values.yaml" \
|
||||
"$LOCAL_REPOSITORY_ROOT/values.test.yaml" \
|
||||
"$LOCAL_REPOSITORY_ROOT/tests/default.yaml" \
|
||||
;
|
||||
do
|
||||
[ -f "$F" ] && HELM_ARGS+=(--values "$F")
|
||||
done
|
||||
done
|
||||
|
||||
for F in \
|
||||
"$CHART_ROOT/values.yaml" \
|
||||
"$CHART_ROOT/values.test.yaml" \
|
||||
@ -63,3 +85,4 @@ _HELM__GET_DEFAULT_VALUES_ARGS() {
|
||||
[ -f "$F" ] && HELM_ARGS+=(--values "$F")
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ VUNDLE__PLUGIN_LIST=$(ls $VUNDLE__PLUGIN_DIR | grep -v 'Vundle.vim' | grep -v 'b
|
||||
source $VUNDLE__BUILD_DEFINITIONS
|
||||
for PLUGIN in $(echo $VUNDLE__PLUGIN_LIST)
|
||||
do
|
||||
typeset -f VUNDLE__BUILD__$PLUGIN >/dev/null 2>/dev/null || {
|
||||
which VUNDLE__BUILD__$PLUGIN >/dev/null 2>/dev/null || {
|
||||
echo -e "\nVUNDLE__BUILD__$PLUGIN() {\n # ... build steps from $HOME/.vim/$PLUGIN \n}" \
|
||||
>> $VUNDLE__BUILD_DEFINITIONS
|
||||
VUNDLE__BUILD__$PLUGIN() {}
|
||||
|
@ -8,7 +8,12 @@ CHECK_ENVIRONMENT
|
||||
#####################################################################
|
||||
|
||||
PLUGIN_INSTALL() {
|
||||
VUNDLE__PLUGIN_INSTALL || return 1
|
||||
[ -d "$HOME/.vim/bundle/Vundle.vim" ] || {
|
||||
mkdir -p "$HOME/.vim/bundle/"
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git "$HOME/.vim/bundle/Vundle.vim"
|
||||
}
|
||||
|
||||
VUNDLE__PLUGIN_INSTALL || return 1
|
||||
VUNDLE__REBUILD_PLUGINS || return 2
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user