Skip to content

Commit

Permalink
arm64,amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
cryi committed Oct 27, 2024
1 parent 0c5625d commit 74d7107
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: tezwatch container
- name: tezos container
uses: docker/build-push-action@v4
with:
file: ./containers/tezos/Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
ARCH=x64
tags: ghcr.io/tez-capital/tezos:latest
push: true
provenance: false

- name: tezwatch container
uses: docker/build-push-action@v4
with:
file: ./containers/tezos/Dockerfile
platforms: linux/arm64
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
ARCH=arm64
tags: ghcr.io/tez-capital/tezos:latest
push: true
provenance: false
10 changes: 9 additions & 1 deletion containers/tezos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM docker.io/ubuntu:jammy

ARG TARGETPLATFORM
ARG ARCH

ENV TEZOS_USER=tezos \
Expand All @@ -18,7 +19,14 @@ RUN useradd -m -d ${TEZOS_HOME} -s /bin/bash ${TEZOS_USER}
COPY scripts/docker/entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh

RUN LATEST_TAG=$(curl -s ${REPO_API} | jq -r .tag_name) && \
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
ARCH="x64"; \
elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
ARCH="arm64"; \
else \
echo "Unsupported platform: ${TARGETPLATFORM}"; exit 1; \
fi && \
LATEST_TAG=$(curl -s ${REPO_API} | jq -r .tag_name) && \
DOWNLOAD_URL="https://github.com/tez-capital/tezos/releases/download/${LATEST_TAG}/octez-all-${ARCH}.zip" && \
echo "Downloading ${DOWNLOAD_URL}" && \
curl -L -o octez.zip ${DOWNLOAD_URL} && \
Expand Down

0 comments on commit 74d7107

Please sign in to comment.