File tree Expand file tree Collapse file tree
.github/actions/setup-ddev Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 env :
3030 CACHE_PROFILE : ${{ inputs.cache-profile }}
3131 INSTALL_MODE : ${{ inputs.install-mode }}
32+ DDEV_VERSION : ${{ inputs.ddev-version }}
3233 run : |-
3334 case "$INSTALL_MODE" in
3435 local|pypi) ;;
4647 ;;
4748 esac
4849
50+ if [[ -n "$DDEV_VERSION" && ! "$DDEV_VERSION" =~ ^(===|==|~=|!=|<=|>=|<|>)[A-Za-z0-9._*+!-]+(,(===|==|~=|!=|<=|>=|<|>)[A-Za-z0-9._*+!-]+)*$ ]]; then
51+ echo "::error::Invalid ddev-version '$DDEV_VERSION'. Use a PEP 440-style version specifier such as ==16.0.0 or >=16,<17."
52+ exit 1
53+ fi
54+
4955 - name : Compute cache date
5056 id : cache-date
5157 shell : bash
@@ -157,7 +163,9 @@ runs:
157163 - name : Install ddev from PyPI
158164 if : ${{ inputs.install-mode == 'pypi' }}
159165 shell : bash
160- run : uv pip install --system "ddev${{ inputs.ddev-version }}"
166+ env :
167+ DDEV_VERSION : ${{ inputs.ddev-version }}
168+ run : uv pip install --system "ddev${DDEV_VERSION}"
161169
162170 - name : Save local ddev cache
163171 if : ${{ inputs.install-mode == 'local' && inputs.cache-profile == 'local-ddev-base' && steps.restore-local-ddev-base-cache.outputs.cache-hit != 'true' }}
You can’t perform that action at this time.
0 commit comments