Skip to content

Commit

Permalink
feat: add arm support
Browse files Browse the repository at this point in the history
  • Loading branch information
tvcsantos committed Feb 4, 2025
1 parent fafbcd6 commit d65baf6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ TAG="${INPUT_TAG:-${GITHUB_REF#refs/tags/}}" # v1.2.3
MINOR="${TAG%.*}" # v1.2
MAJOR="${MINOR%.*}" # v1
MESSAGE="Release ${TAG}"
IMAGE="ghcr.io/$GITHUB_REPOSITORY:$TAG"

# Build Docker Image
docker build -t "ghcr.io/$GITHUB_REPOSITORY:$TAG" .
# Login to GHCR
printenv GITHUB_TOKEN | docker login ghcr.io --username "${GITHUB_REPOSITORY%/*}" --password-stdin
docker push "ghcr.io/$GITHUB_REPOSITORY:$TAG"

# Build Docker Image
# Build and push multi-platform image
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag "$IMAGE" \
--push \
.

docker logout ghcr.io

# Set up Git.
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ jobs:
with:
dry_run: true

- name: Set up QEMU for ARM Emulation
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
use: true

# build the Docker Image
- name: build the Docker Image
if: "${{ !steps.bumpr.outputs.skip }}"
Expand Down

0 comments on commit d65baf6

Please sign in to comment.