Fix argocd CLI download in forgejo-runner image
All checks were successful
Build Container / build (push) Successful in 1m40s

- Add -L flag to follow redirects
- Add -f flag to fail on HTTP errors
- Use dpkg --print-architecture as fallback for TARGETARCH
- Verify binary works after download

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-02-03 17:11:25 -08:00
commit 09317fecc1

View file

@ -44,9 +44,12 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& mv /root/.local/bin/uvx /usr/local/bin/uvx
# Install argocd CLI (for syncing apps from workflows)
RUN curl -sSL -o /usr/local/bin/argocd \
"https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-${TARGETARCH}" \
&& chmod +x /usr/local/bin/argocd
# Use dpkg --print-architecture as fallback since TARGETARCH may be empty in single-platform builds
RUN ARCH="${TARGETARCH:-$(dpkg --print-architecture)}" \
&& curl -fsSL -o /usr/local/bin/argocd \
"https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-${ARCH}" \
&& chmod +x /usr/local/bin/argocd \
&& argocd version --client
# Default to bash
CMD ["/bin/bash"]