Skip to content

yq v4 Package release .tar.gz, breaks HomelabOS Docker Image

yq GitHub releases now include a .tar.gz, which breaks the HomelabOS Docker Image.

See https://api.github.com/repos/mikefarah/yq/releases/latest

"browser_download_url": "https://github.com/mikefarah/yq/releases/download/v4.7.0/yq_linux_amd64"
...
"browser_download_url": "https://github.com/mikefarah/yq/releases/download/v4.7.0/yq_linux_amd64.tar.gz"

Updating the Dockerfile to exclude gzipped / archived files and return the first match only fixes this issue.

Original: curl -s https://api.github.com/repos/mikefarah/yq/releases/latest | grep browser_download_url | grep $key | cut -d '"' -f 4

if [ $(uname -m) == "x86_64" ]; then key="yq_linux_amd64"; else key="yq_linux_arm64"; fi && \
wget $(curl -s https://api.github.com/repos/mikefarah/yq/releases/latest | grep browser_download_url | grep $key | grep -v ".tar.gz" | head -1 | cut -d '"' -f 4) -O /usr/bin/yq && \

yq v3 to v4 Guide: https://mikefarah.gitbook.io/yq/v/v4.x/upgrading-from-v3

ConfigTasks.sh

  # Try to figure out where key is defined
  FILE=settings/config.yml
  SETTING_VALUE=$(Task::run_docker yq e "$key" // "$value" "$FILE")
  if [ -z ${SETTING_VALUE} ]; then
      FILE=settings/vault.yml
      SETTING_VALUE=$(Task::run_docker yq e "$key" // "$value" "$FILE")
      if [ -z ${SETTING_VALUE} ]; then
          echo "Key does not exist in config.yml nor vault.yml."
          # Re-encrypt vault
          Task::encrypt
          exit 1
      fi
  fi

etc. etc.

We should probably backlog an issue to ping yq to a major version.

Edited by Derek Reese
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information