Fix argocd CLI download in forgejo-runner image
All checks were successful
Build Container / build (push) Successful in 1m40s
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:
parent
4d3222d91b
commit
09317fecc1
1 changed files with 6 additions and 3 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue