diff --git a/.gitea/workflows/release_build.yml b/.gitea/workflows/release_build.yml index b36d783..0afdda2 100644 --- a/.gitea/workflows/release_build.yml +++ b/.gitea/workflows/release_build.yml @@ -35,8 +35,11 @@ jobs: run: | if [ -f Dockerargs ]; then echo "Dockerargs found. Checking upstream..." - REPO_URL=$(git config -f Dockerargs --get repo.url) - REPO_BRANCH=$(git config -f Dockerargs --get repo.branch || echo "main") + echo "Dockerargs found. Checking upstream..." + # Parse repo info using awk to avoid git config restrictions on underscores in keys elsewhere in the file + REPO_URL=$(awk -F '=' '/\[repo\]/{flag=1; next} /\[/{flag=0} flag && /^url=/{print $2}' Dockerargs | tr -d ' \r\n') + REPO_BRANCH=$(awk -F '=' '/\[repo\]/{flag=1; next} /\[/{flag=0} flag && /^branch=/{print $2}' Dockerargs | tr -d ' \r\n') + if [ -z "$REPO_BRANCH" ]; then REPO_BRANCH="main"; fi # Fetch upstream SHA if [ -n "$REPO_URL" ]; then