Skip to content

Commit

Permalink
feat: add support for multiple architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouter committed Dec 4, 2023
1 parent 526d451 commit ad758cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/docker-release-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ jobs:
with:
push: true
tags: ${{ steps.prep.outputs.tags }}
build-args: |
ARCH=${{ runner.arch }}
platforms: |-
linux/amd64
2 changes: 2 additions & 0 deletions .github/workflows/docker-release-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ jobs:
with:
push: true
tags: ${{ steps.prep.outputs.tags }}
build-args: |
ARCH=${{ runner.arch }}
platforms: |-
linux/amd64
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
FROM debian:latest as builder

ARG VERSION=0.2.0
ARG ARCH=amd64

RUN apt update && \
apt install -y curl && \
if [[ "$ARCH" == "ARM64" ]]; then \
ARCH="arm64" \
elif [[ "ARCH" == "X64' ]]; then \
ARCH="amd64"\
fi && \
curl -sLo /tmp/messagebird_exporter.deb \
https://github.com/roaldnefs/messagebird_exporter/releases/download/v${VERSION}/messagebird_exporter_${VERSION}_linux_amd64.deb && \
https://github.com/roaldnefs/messagebird_exporter/releases/download/v${VERSION}/messagebird_exporter_${VERSION}_linux_${ARCH}.deb && \
apt install -y /tmp/messagebird_exporter.deb
Expand Down

0 comments on commit ad758cc

Please sign in to comment.