Skip to content

Commit ecc5e34

Browse files
committed
Merge branch 'main' into releases/v1
2 parents abd5374 + 741f063 commit ecc5e34

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.github/build.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,19 @@ TAG="${INPUT_TAG:-${GITHUB_REF#refs/tags/}}" # v1.2.3
77
MINOR="${TAG%.*}" # v1.2
88
MAJOR="${MINOR%.*}" # v1
99
MESSAGE="Release ${TAG}"
10+
IMAGE="ghcr.io/$GITHUB_REPOSITORY:$TAG"
1011

11-
# Build Docker Image
12-
docker build -t "ghcr.io/$GITHUB_REPOSITORY:$TAG" .
12+
# Login to GHCR
1313
printenv GITHUB_TOKEN | docker login ghcr.io --username "${GITHUB_REPOSITORY%/*}" --password-stdin
14-
docker push "ghcr.io/$GITHUB_REPOSITORY:$TAG"
14+
15+
# Build Docker Image
16+
# Build and push multi-platform image
17+
docker buildx build \
18+
--platform linux/amd64,linux/arm64 \
19+
--tag "$IMAGE" \
20+
--push \
21+
.
22+
1523
docker logout ghcr.io
1624

1725
# Set up Git.

.github/workflows/docker.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,19 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13+
14+
- name: Set up QEMU for ARM Emulation
15+
uses: docker/setup-qemu-action@v3
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
with:
20+
use: true
21+
1322
- name: Build the Docker image
14-
run: docker build . --file Dockerfile --tag "reviewdog-actionlint:$(date +%s)"
23+
run: |
24+
docker buildx build \
25+
--platform linux/amd64,linux/arm64 \
26+
--tag "reviewdog-actionlint:$(date +%s)" \
27+
--file Dockerfile \
28+
.

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ jobs:
3636
with:
3737
dry_run: true
3838

39+
- name: Set up QEMU for ARM Emulation
40+
uses: docker/setup-qemu-action@v3
41+
42+
- name: Set up Docker Buildx
43+
uses: docker/setup-buildx-action@v3
44+
with:
45+
use: true
46+
3947
# build the Docker Image
4048
- name: build the Docker Image
4149
if: "${{ !steps.bumpr.outputs.skip }}"

0 commit comments

Comments
 (0)