Skip to content

Commit 89a1814

Browse files
fix: Docker cleanup
1 parent af11a0c commit 89a1814

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
3333

3434
docker:
35+
needs: linux
3536
runs-on: ubuntu-latest
3637

3738
if: github.repository_owner == 'ctrlplanedev'
@@ -59,6 +60,7 @@ jobs:
5960
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then
6061
echo "DOCKERHUB_LOGIN=false" >> $GITHUB_ENV
6162
else
63+
echo "Credentials are available"
6264
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV
6365
fi
6466

docker/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ FROM alpine:3.19 AS builder
33
ARG CLI_VERSION
44

55
RUN apk add --no-cache curl tar && \
6-
curl -L --fail "https://github.com/ctrlplanedev/cli/releases/download/${CLI_VERSION}/ctrlc_Linux_x86_64.tar.gz" -o ctrlc.tar.gz && \
6+
ARCH=$(case $(uname -m) in \
7+
"x86_64") echo "x86_64" ;; \
8+
"aarch64") echo "arm64" ;; \
9+
*) echo "x86_64" ;; \
10+
esac) && \
11+
curl -L --fail "https://github.com/ctrlplanedev/cli/releases/download/${CLI_VERSION}/ctrlc_Linux_${ARCH}.tar.gz" -o ctrlc.tar.gz && \
712
tar xzf ctrlc.tar.gz && \
813
mv ctrlc /usr/local/bin/ && \
914
chmod +x /usr/local/bin/ctrlc
@@ -12,4 +17,5 @@ FROM alpine:3.19 AS final
1217

1318
COPY --from=builder /usr/local/bin/ctrlc /usr/local/bin/ctrlc
1419

15-
CMD ["ctrlc", "--help"]
20+
ENTRYPOINT ["/usr/local/bin/ctrlc"]
21+
CMD ["--help"]

0 commit comments

Comments
 (0)