Skip to content

Commit

Permalink
Merge pull request #155 from tvcsantos/feature/add-arm-support
Browse files Browse the repository at this point in the history
feat: add arm support
  • Loading branch information
shogo82148 authored Feb 17, 2025
2 parents fafbcd6 + d508bcc commit 741f063
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 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
16 changes: 15 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- 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

- name: Build the Docker image
run: docker build . --file Dockerfile --tag "reviewdog-actionlint:$(date +%s)"
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag "reviewdog-actionlint:$(date +%s)" \
--file Dockerfile \
.
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 741f063

Please sign in to comment.