diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..50e50eb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + labels: [dependencies, ci] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b4dbc90 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI +on: + push: + branches: [main, dev, 'feat/**', 'fix/**'] + pull_request: + branches: [main, dev] +jobs: + shellcheck: + name: ShellCheck + runs-on: ubuntu-latest + container: + image: debian:trixie-slim + steps: + - run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git shellcheck + - uses: actions/checkout@v6 + - run: find . -name '*.sh' -exec shellcheck --severity=warning {} + + + # No ansible-lint job: despite the repo name there are no roles or + # playbooks here — only shell scripts, ansible.cfg variants and Python + # callback plugins. Re-add it (profile: basic + .ansible-lint config, + # like the sibling repos) if Ansible YAML ever lands in this tree. diff --git a/devkit_proxmox.STDIN.normalize.to.jsons.sh b/devkit_proxmox.STDIN.normalize.to.jsons.sh index 0bf33d1..66b5d92 100755 --- a/devkit_proxmox.STDIN.normalize.to.jsons.sh +++ b/devkit_proxmox.STDIN.normalize.to.jsons.sh @@ -5,7 +5,6 @@ parse_stdin_schema() { local SCHEMA=("$@") local STDIN_DATA KEY_NAME KEY_TYPE - local SIMPLE_VALUE SIMPLE_TYPE local KV_PAIR=() if [ -t 0 ]; then @@ -15,15 +14,6 @@ parse_stdin_schema() { STDIN_DATA=$(cat -) - if [[ "$STDIN_DATA" =~ ^[0-9]+$ ]]; then - SIMPLE_TYPE="INT" - SIMPLE_VALUE="$STDIN_DATA" - - elif [[ "$STDIN_DATA" =~ ^[a-zA-Z0-9._-]+$ ]]; then - SIMPLE_TYPE="STR" - SIMPLE_VALUE="$STDIN_DATA" - fi - # # PURE TEXT CASE # diff --git a/proxmox_vm.list_with_api.to.jsons.sh b/proxmox_vm.list_with_api.to.jsons.sh index a2980be..e587615 100755 --- a/proxmox_vm.list_with_api.to.jsons.sh +++ b/proxmox_vm.list_with_api.to.jsons.sh @@ -11,7 +11,6 @@ set -euo pipefail -ACTION="vm_list" SOURCE_TAG="proxmox-api" DEFAULT_OUTPUT_JSON=true ARG_VM_NAME_FILTER="" diff --git a/proxmox_vm.vm_id.get_usage.to.jsons.sh b/proxmox_vm.vm_id.get_usage.to.jsons.sh index 0717d73..9d29192 100755 --- a/proxmox_vm.vm_id.get_usage.to.jsons.sh +++ b/proxmox_vm.vm_id.get_usage.to.jsons.sh @@ -9,8 +9,6 @@ set -euo pipefail ACTION="vm_list_usage" -# DEFAULT_OUTPUT_JSON=true # todo -DEFAULT_OUTPUT_JSON=true # ARG_VM_NAME_FILTER="" #### #### #### #### #### #### #### #### #### #### #### #### #### #### #### #### @@ -75,16 +73,12 @@ proxmox__inc.warmup_checks_stdin.sh # #### #### #### #### #### #### #### #### #### #### #### #### #### #### #### #### -OUTPUT_JSON="$DEFAULT_OUTPUT_JSON" - while [[ $# -gt 0 ]]; do case "$1" in --json) - OUTPUT_JSON=true shift ;; --text) - OUTPUT_JSON=false shift ;; -*) diff --git a/proxmox_vm.vm_id.list_vm_and_extract_vm_name_with_api.to.jsons.sh b/proxmox_vm.vm_id.list_vm_and_extract_vm_name_with_api.to.jsons.sh index 49e85d3..93eeb54 100755 --- a/proxmox_vm.vm_id.list_vm_and_extract_vm_name_with_api.to.jsons.sh +++ b/proxmox_vm.vm_id.list_vm_and_extract_vm_name_with_api.to.jsons.sh @@ -10,7 +10,6 @@ set -euo pipefail -ACTION="vm_list" SOURCE_TAG="proxmox-api" DEFAULT_OUTPUT_JSON=true